Reputation: 83697
So I have a common library repository which looks something like:
common
__init__.py
foo
__init__.py
bar.py
README.md
requirements.txt
setup.py
In a separate project I have it in requirements.txt like this:
git+https://github.com/something/something.git#egg=common
When I do pip install it installs it to:
venv
src
common
The problem is, the common library has its own requirements.txt file.
How to tell pip to install requirements of the external library?
Upvotes: 2
Views: 2970
Reputation: 930
When you pip install it uses setup.py
of the downloaded package to find dependencies, as opposed to running "-r requirements.txt"
.
Changing the setup.py
of common to define dependencies is what you're after.
For an example of defining install_requires
in your setup.py
file, see the Hitchhiker's Guide to Packaging.
Upvotes: 1
Reputation: 19030
pip -r <file|url>
supports eitehr a local file or a url. e.g:
pip install -r http://localhost:8080/requirements.txt
Tested and confirmed.
Upvotes: 0