-
Notifications
You must be signed in to change notification settings - Fork 11
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
Support for several pypi mirrors? #6
Comments
I envision the config being similar to secondary source in the standard pyproject.toml. [[tool.poetry.source]]
name = "foo"
url = "https://foo.bar/simple/"
default = false
secondary = false https://python-poetry.org/docs/repositories/#private-repository-example |
The overall implementation I am thinking is that you could have the config file looking like the one below and even include credentials there: [plugins]
[plugins.pypi_mirror.example_repo]
url = "https://example.org/repository/pypi-proxy/simple/"
[plugins.pypi_mirror.enterpise_repo_1]
url = "https://myenterprise.org/pypi/simple"
username = "me"
password = "s3cr3t"
[plugins.pypi_mirror.enterpise_repo_2]
url = "https://myenterprise.org/pypi-internal/simple"
username = "me"
password = "s3cr3t" And then have that handled in your poetry-plugin-pypi-mirror/src/poetry_plugin_pypi_mirror/plugins.py Lines 31 to 33 in b650dc5
I am not familiar on how to parse toml so I am going to try an open a PR implementing this, I might need help on the handling credentials side of things |
Hi,
First of all thanks for writing this plugin. I write packages in a corporate environment with no access to pypi and poetry was for my purpose unusable or at least quite annoying to use because of this lack of support of a global pypi url.
I happen to actually use several pypi mirrors for downloading packages in my environment. Does your plugin support having several mirrors configured and if so how would I set that up in the poetry config file?
The text was updated successfully, but these errors were encountered: