Should pip support named local requirements? #8035
Labels
C: direct url
Direct URL references (PEP 440, PEP 508, PEP 610)
C: unnamed reqs
Handling and processing unnamed requirements
state: needs discussion
This needs some more discussion
Pip cannot install packages from relative local directories that depend on each other.
Assume you have
toola/setup.py
:and
toolb/setup.py
So
toola
depends ontoolb
.pip install --no-index ./toola ./toolb
fails withNo matching distribution found for toolb (from toola==0.0.0)
.A workaround is to use PEP 508 direct urls, so this works:
pip install --no-index "toola @ file://$PWD/toola" "toolb @ file://$PWD/toolb"
Note PEP 508 requires absolute paths. This is however inconvenient and it is not possible to put this in a requirement file.
Describe the solution you'd like
It seems the issue stems from limitation of dependency resolution in presence of unnamed requirements.
PEP 508 provides a mechanism to name requirements, but rightly forbids relative
file://
URLs with relative paths. This should continue to be forbidden inRequires-Dist
metadata (see discussion).So I see two approaches:
Additional context
#192 also touches this subject.
The text was updated successfully, but these errors were encountered: