3 ms·
In an enterprise world, you can't rely on dependencies being present on the target machine, so install a .venv/ directory in your application distribution conta
by gjvc 5y ago
In an enterprise world, you can't rely on dependencies being present on the target machine, so install a .venv/ directory in your application distribution containing all the libraries (populated by pip) and a bin/venv-python wrapper script to set PYTHONPATH correctly and to call the .venv/bin/python. Then create a bin/run-app script to call bin/venv-python, with the location of your entry point module from src/python/
In summary: bin/run-app -> bin/venv-python -> .venv/bin/python -- I'm not sure how to make it simpler than this. The cost is perhaps in disk space, but I don't care about that.
Or don't do the above and deploy via docker and use pip to install to the system python in the image.