I'll use the opportunity to moan about the state of packaging in the Python world. Why, after so many years, there is no way for me to ship software written in python, in deb format?
I end up doing some real crazy stuff:
* build in docker
* using virtualenv /usr/local/mypackage
* then manually copy over the init scripts "cp /usr/local/mypackage/bin/* /usr/local/bin"
* and debianize "/usr/local/mypackage/" and "/usr/local/bin".
Except it doesn't work:
* I need root do create the venv in /usr/local.
* This technique copies garbage like "activate" script to bin.
* virtualenv ships its own python binary. If the python version on host differ, it won't work.
* The workaround is to rewrite the bin scripts.
Total mess. All I need is a deb with some bin scripts, and all dependencies bundled. Is it _that_ hard...
I have some hopes to wrap a pex into deb/rpm, but I would not call this approach simple.
That's unfortunate since Python is a wonderful language for many data-sciency tasks - Python makes things possible and pleasant, that would be a pain in other languages.
* [1] https://github.com/jordansissel/fpm
* [2] https://github.com/kevinconway/rpmvenv
* [3] https://pex.readthedocs.org/en/latest/
* Another tool: https://github.com/spotify/dh-virtualenv