-
Notifications
You must be signed in to change notification settings - Fork 56
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
Missing --extra-index-url
lines in requirements.txt
for second primary package source
#269
Comments
Actually, that's what is done. See https://github.com/python-poetry/poetry-plugin-export/blob/main/tests/test_exporter.py#L1792 Probably, there is something special about PyPI that is not handled correctly. |
Thanks for the quick reply @radoering ! [[tool.poetry.source]]
name = "foo"
url = "https://pypi.python.org/simple"
priority = "primary" and after running
which seems to also not work in this order (i.e. |
I chose a different approach in #270. Since pip does not care about order by design (see pypa/pip#8606 for details), it does not matter which source is the
That's actually a pip bug. See #149. But since it is easy to make sure that |
For a project I work on, we have a different package source configured as
primary
(since poetry deprecateddefault
) with PyPI as second primary, as recommended in https://python-poetry.org/docs/repositories/ .This is the relevant section of our
pyproject.toml
:When exporting with
poetry export -f requirements.txt --without-hashes --output requirements.txt
the output file starts with just:so when trying to install the project dependencies from this file, it fails with:
Before the merge of #263 , the file started with:
and it worked fine.
I think the proper solution is to also add for each primary after the first an
--extra-index-url URL
line, e.g. adding the following line fixes the issue for us:The text was updated successfully, but these errors were encountered: