indygreg / python-build-standalone

Produce redistributable builds of Python
Mozilla Public License 2.0
1.99k stars 127 forks source link

.tar.gz artefacts (for Bazel) #79

Closed jheaff1 closed 3 years ago

jheaff1 commented 3 years ago

Hi,

This awesome project could be utilised to provide hermetic Python toolchains within a project built using Bazel.

Currently, Bazel’s http_archive rule does not support .tar.zst files. Would it be possible for this project to also provide .tar.gz files?

indygreg commented 3 years ago

If bazel toolchain support is what you are after, I think a reasonable feature request would be to provide artifacts that can be used explicitly as a bazel toolchain. These would likely be .tar.gz archives with just the Python installation (not the object files and other build artifacts/metadata).

Would it be sufficient to publish a .tar.gz with just the contents of the python/install directory to serve as bazel toolchains? Should there be a root directory (like python/) or should we just move everything in python/install to the root directory (e.g. bin/python3.9)?

jheaff1 commented 3 years ago

Yes I think a tar.gz containing the python install directory would suffice.

The directory structure of the tarball shouldn’t matter, although moving everything from python/install to the root directory seems sensible

indygreg commented 3 years ago

I just committed a script and basic CI support for normalizing a .tar.zst archive to a .tar.gz archive. The archives essentially have python/install/* rewritten to python/* and the compression changed from zstandard to gzip.

I plan to publish the .tar.gz archives as part of the next release. That may happen as early as the end of the day.

jheaff1 commented 3 years ago

Brilliant, thank you very much!