poetry-plugin-dynamic-override-sources is a plugin for poetry package manager in python.
With pip, you can override the package index URL using configuration files or environment variables such as:
PIP_INDEX_URL
PIP_PROXY
However, with poetry there is no such option. The pyproject.toml project configuration specifies one or more sources that are to be used for resolving packages from the artifact storage.
This plugin makes it possible to use environment variable overrides like:
PIP_INDEX_URL
will override ALL repository urls, intending to function similar topip install --index-url
POETRY_SOURCE_SOME_REPO_URL
will override the source namedsome-repo
with the specified urlPOETRY_SOURCE_PYPI_URL
will override thePyPI
repository's URL. This is a special case.
poetry self add poetry-plugin-dynamic-override-sources
See plugin installation instructions.
Setup
poetry install
Testing
poetry run pytest
poetry publish --build
- poetry-plugin-use-pip-global-index-url - plugin that this was forked from
- poetry-plugin-pypi-mirror - upstream plugin that inspired
poetry-plugin-use-pip-global-index-url
. - python-poetry/poetry#1632 - poetry feature request to add support for global repository URL replacement