-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Need a way to set a global PyPI repo URL for all project manually. #2940
Comments
I see what you mean, there should really be a global control, or I hope the project leader can use even pip configuration. Is there some one can answer it, make poetry use pip repo. Maybe you need someway to connect google, you know it. |
@dev-techmoe I can definitely appreciate your situation and I do agree that there are various cases where you would want to use a mirror instead of public pypi index. Poetry has some hard-coded assumptions about PyPI. This means taht simply setting a url for PyPI will not work. The assumptions include (but not limited to), the use of the JSON endpoint to get package metadata, There is no guarentee that this exists for all mirrors. We need to,
For this issue we should keep generic environment specific overrides out of scope; but only focus on supporting PyPI mirrors for an environment. |
So, I agree that solving for this use-case is blocked on the above (supporting full Pypi mirrors or repositories based on full pypi mirrors that don't implement the json apis), but it's actually a different feature. I actually also have this use-case, but it's because we have multiple private repositories that we actually want to publish to as they have specific use-cases as we want their ecosystems to be independent of one-another and we want the build logic to all be the same and use the same underlying code repository, but our build logic would do some environment setup before running |
@teruokun I think your usecase can be handled in otherways. For example; export POETRY_REPOSITORIES_SOMEWHERE_URL=https://somewhere.com/legacy
export POETRY_HTTP_BASIC_SOMEWHERE_USERNAME=username
export POETRY_HTTP_BASIC_SOMEWHERE_PASSWORD=password
poetry publish --build -r somewhere Alternatively, once #3068 is done, you could do something like this. poetry publish --build -r https://somewhere.org/legacy -u username -p password |
Duplicate of #1632 |
Thanks for pointing to the duplications @NateScarlet. |
#4944 -- looks like it's implemented here. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Feature Request
Hello everyone, I'm a python developer live in Mainland China. As well known the network connection is so bad in my country that we cannot connect to the official PyPI repo directly sometimes. So most of us usually some PyPI mirrors in our region (like https://mirrors.aliyun.com/pypi/simple/, it's deployed by AlibabaCloud) to get a fast and stabilizing network connection. PIP gives us a way to set the index globally using
pip config set global.index-url
. But I cannot find related config items in Poetry.Okay, I know what you want to say, I know I can set repo info in my
pyproject.toml
like this.But it will cause some tricky problems. If I have some workmates in other countries, they don't need repo mirrors to speed up service, even it will make them cannot use PyPI repo (thanks to stupid GFW), or we need to use Github Action as our CI service, they all don't need this config item. So I think the PyPI repo URL should not as a project config in my project repo, we need a way to set in our dev environment and use it for all projects. Thank you.
The text was updated successfully, but these errors were encountered: