My python package depends on a private package that is not in pypi. You can assume that the structure of the private package is this.
Goal: store the 3rd party private package somewhere within my own package in a whatever way such that when I run pip install -r requirements.txt
(or even better pip install <my_pkg_name>
), the 3rd party dependency is installed. This must work in Windows and Linux.
A potential workaround: Do not install the 3rd party module. Instead, place it in your main package directory as it is and import
its modules.
/my_pkg
/non_pypi_pkg
/my_pkg
module.py
Where module.py
is able to import non_pypi_pkg
without installing non_pypi_pkg
.
Question: What what is the recommended practice to achieve the goal? Can we do any better than my workaround?