indygreg / PyOxidizer

A modern Python application packaging and distribution tool
Mozilla Public License 2.0
5.47k stars 239 forks source link

Custom python distribution links #589

Open kotborealis opened 2 years ago

kotborealis commented 2 years ago

pyOxidizer downloads python binaries from github releases (see default_python_distributions.rs).

I want to selfhost those artifacts, is there any way to specify custom download links during pyoxidizer runtime?

indygreg commented 2 years ago

Yes, config files can specify the URL of a distribution to fetch by constructing a PythonDistribution instance from Starlark instead of calling default_python_distribution(). See https://gregoryszorc.com/docs/pyoxidizer/0.22.0/pyoxidizer_config_type_python_distribution.html.

A potential feature would be to change the root URL for the default Python distributions. Would that feature be of interest to you?

kotborealis commented 2 years ago

Thanks!

Yeah, such feature would be useful, for example, in air-gapped environments, where you can't download something from the internet during build.