-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Description
- I am on the latest Poetry version.
- I have searched the issues of this repo and believe that this is not a duplicate.
- If an exception occurs when executing a command, I executed it again in debug mode (
-vvvoption).
- OS version and name: macOS Mojave 10.14.6
- Poetry version: 1.1.3
- Link of a Gist with the contents of your pyproject.toml file:
[[tool.poetry.source]]
name = 'foobar'
url = 'http://repository.intranet.foobar.com/artifactory/api/pypi/pypi-virtual/simple'
[build-system]
requires = ["poetry_core>=1.0.0"]
build-backend = "poetry.core.masonry.api"Issue
In docs we can read:
Any custom repository will have precedence over PyPI.
In the above example, foobar is a proxy repo incl. both internal packages and the public ones from PyPI. Running poetry install should cause a creation of poetry.lock, where all the packages have foobar in their source field. However, it's completely opposite - none of the packages has a source field, which means all of them are downloaded directly from PyPI.
When I add default = true to the above source element, which means PyPI is disabled, everything works properly - generated poetry.lock includes foobar as a source for all packages and installation doesn't break, so it's not a problem with repository itself.
It's especially frustrating when you want to use poetry export (for any reason), because then the final requirements.txt doesn't include neither --index-url nor --extra-index-url (it seems it depends on the actually used sources, not the pyproject.toml content).