A command line interface to Twitter's pex targeting complex, numeric-heavy Python packages.
bintl (the Yiddish word for ‘bundle’) is a Python 2 and 3 compatible command line tool to bundle and deploy Python packages into pex files (python executables) with its own interpreter and dependencies. If you just finished making a Python package and want to deploy it as a standalone executable to your servers, making no calls out to the internet, etc. this will make your life easier!
Pex is super cool and does all the hard work, but it was hard to understand how to use as an outsider, and tacitly assumes you’re building simpler packages (not numeric-heavy stuff with complex dependencies on BLAS or ATLAS).
Distributing numeric work presents lots of conflicting standards between conda environments, virtual environments, etc., so having a standalone executable to not worry about is fantastic!
All you have to do is provide an absolute path to your package, the interpreter you want to bundle, and an output file. You can also add entrypoints (optional) if you want the executable to run a program.
$ bintl --package=/abs/path/to/pkg --interpreter=/abs/path/to/bin/python --entrypoints=/abs/path/to/entrypoints/script:main --output=package-name.pex $ # To run this specific python executable: $ ./package-name.pex
That’s it! You can move this executable to any other machine (with the same flavor OS) and use your package.
pip install bintl