Allow download from alternative repositoires without authentication for pip via environment variables
sinoroc opened this issue · comments
sinoroc commented
In Poetry it is possible to specify alternative repositories for the download of dependencies...
pyproject.toml
[[tool.poetry.source]]
name = "foo"
url = "https://foo.bar/simple/"
Our plugin should be able to set the appropriate environment variables (PIP_INDEX_URL
, PIP_EXTRA_INDEX_URL
) so that pip can download distributions from those alternative repositories. To make things easier for a first step, we'll ignore authentication.
Related:
- https://python-poetry.org/docs/repositories/#install-dependencies-from-a-private-repository
- https://pip.pypa.io/en/stable/reference/pip_install/#cmdoption-index-url
- https://pip.pypa.io/en/stable/reference/pip_install/#cmdoption-extra-index-url
- https://pip.pypa.io/en/stable/user_guide/#environment-variables
- #8
sinoroc commented
I am not sure what we should do, in case the environment variables are already set outside of the tox.ini
file, on the command line for example:
PIP_EXTRA_INDEX_URL=https://host.local/simple tox
PIP_INDEX_URL=https://host.local/simple tox