Open lucharo opened 1 year ago
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 src/plugins.py
:
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?