Description
Hello,
I want to make use of privately packaged projects for the Python 3 Flex environment. The recommended approach:
To use private dependencies:
- Run pip install -t lib my_module to copy dependencies into a local folder named lib.
- Add an empty __init__.py file to the lib directory to make it a module.
- Import the module in your app. For example:
import lib.my_module
I'm not particularly a massive fan of this approach and I would have thought this would have short comings with inter-package relationships?
I would prefer to have a packaged dependency (in the form of a *.tar.gz or *.whl) copied to a dist
directory perhaps, and then referenced within requirements.txt
like so:
numpy
pandas
dist/local_package-0.0.1.tar.gz
Unfortunately this approach doesn't seem possible as the requirements.txt
is installed before the rest of the contents is uploaded so this local package doesn't exist at the time of installation. Is there any particular reason why the entire app cannot be uploaded before the installation?
My personal opinion is that this would be cleaner than the recommended approach.