Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: adds support for custom sources for Python distributions #1455

Conversation

axel-kah
Copy link
Contributor

@axel-kah axel-kah commented May 2, 2024

This PR implements #1194 .

Instead of adding another request for this feature I thought I could just contribute one possible solution. It would unlock the majority of enterprise users which have to deal with locked down compute environments. Please be gentle though, this is my first PR in a high profile repo馃槄

This feature introduces two new environment variables and does not touch the script-generated distributions.py file.

I was unable to find public mirrors for the Python/PyPy interpreter, but I could write a test which mimics a mirror by downloading some archives and host them via the built in webserver for example and pass that local host URL as a custom distribution source. Just let me know.

@EricGao888
Copy link

Looking forward to this feature desperately.

@ofek
Copy link
Sponsor Collaborator

ofek commented May 26, 2024

Thanks! It's hard to modify infra but easy to set environment variables so I've changed it such that you can set a unique environment variable per distribution rather than having to mandate a URL scheme.

Copy link
Sponsor Collaborator

@ofek ofek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much, good idea that did not require a new plugin type! 馃敟

@ofek ofek changed the title feat: adds support for python and pypy distribution mirrors feat: adds support for custom sources for Python distributions May 26, 2024
@ofek ofek merged commit c84d7b3 into pypa:master May 26, 2024
46 checks passed
github-actions bot pushed a commit that referenced this pull request May 26, 2024
@ofek
Copy link
Sponsor Collaborator

ofek commented May 28, 2024

@axel-kah axel-kah deleted the feature/adds-support-for-python-and-pypy-distribution-mirrors branch May 28, 2024 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants