-
-
Notifications
You must be signed in to change notification settings - Fork 274
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
Allow custom remote/local python management archive locations #1194
Comments
I would also need this since our on-prem Gitlab does not allow access to GitHub, but we might cache the packages on Artifactory. |
Similar to @johannesloibl’s comment above, this is also needed for enterprise environments like mine where access to most of the internet is firewalled. Software is supposed to be installed from our internal mirrors of various indexes. |
Echoing @johannesloibl and @a-reich This is a blocker for me because I need to be able to pull from a private artifact repository or internal system for everything. |
Going to release this tonight #1455 Please let me know if this is sufficient so that this issue may be closed. |
This is a great minimal solution that will help lots of people, and addresses the core of the problem. This issue can be closed. I think if more features are needed in the future a new issue could be opened. |
The new python management capability is awesome. Currently the distribution archives are pulled from
https://github.com/indygreg/python-build-standalone
orhttps://downloads.python.org/pypy
, which is hard coded inhatch/src/hatch/python/distributions.py
Line 15 in f89c577
I would like to propose an update to support using custom distribution sources. This would support a few use cases:
To solve this issue, I would propose the following changes:
distributions.py
, loadable usingdistributions.yml
. For example, a user could havein their
.bashrc
, with their custom definitions in distributions.yml. If this environment variable doesn't exist, hatch will use the default distributions located atsrc/hatch/python/distributions.yml
.hatch python
command that allows overriding the distributions list. This could be something likehttps://github.com/indygreg/python-build-standalone/releases/download/20231002/cpython-3.12.0%2B20231002-aarch64-unknown-linux-gnu-install_only.tar.gz
as well as local files such asfile:///path/to/local/cpython-3.12.0%2B20231002-aarch64-unknown-linux-gnu-install_only.tar.gz
One complication I haven't thought through is how to handle installed distributions when the user changes the distributions list...
I would be happy to begin implementing these changes if there are no major issues and they would be merged into a future release.
The text was updated successfully, but these errors were encountered: