-
Notifications
You must be signed in to change notification settings - Fork 614
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
--index-url
from requirements.txt
is ignored
#1692
Comments
Will take a look, thanks! |
(description edited because it's more related to arguments default values rather than |
Is it possible to add a private PyPI in the |
Not yet, but we will support persistent configuration of registries in the future. |
Thanks for the quick fix |
## Summary When we read `--index-url` from a `requirements.txt`, we attempt to respect the `--index-url` provided by the CLI if it exists. Unfortunately, `--index-url` from the CLI has a default value... so we _never_ respect the `--index-url` in the requirements file. This PR modifies the CLI to use `None`, and moves the default into logic in the `IndexLocations `struct. Closes #1692.
@zanieb is there a tracking issue for that feature I can subscribe to? |
--index-url
is ignored inrequirements.txt
, no issue with--extra-index-url
parameter.Look like it's related to the way IndexUrl argument is used. This argument is always initialized with a value (here) and
combine
always keep the previous value if present (here).If I invert the expression in
combine
, my--index-url
inrequirements.txt
is correctly used; but this is maybe not the expected way to fix it because command line parameter (if really defined) should take precedence ?This affect both
pip install
andpip compile
commands.Fail with this
requirements.txt
:Work with:
With both commands:
To set the
--index-url
, the current workaround is to always set in on command line like:The text was updated successfully, but these errors were encountered: