bindings: python: add script to generate sdist and wheels
authorVincent Fazio <vfazio@gmail.com>
Tue, 11 Jun 2024 20:50:41 +0000 (15:50 -0500)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Wed, 12 Jun 2024 18:15:21 +0000 (20:15 +0200)
commit72d2fa01a2c1ed8b13d54a5a33f54babe979eacc
tree85e7d3bd040321d15e8e2d49146e34f12152711e
parent37f3676cef721e6909ea84cd6c4ada5dab84f4fb
bindings: python: add script to generate sdist and wheels

Introduce a shell script that generates an sdist tarball and PEP 600/656
conformant wheels.

The wheels are generated via cibuildwheel, a tool provided by the Python
Packaging Authority (PyPA) [0]. The tool leverages toolchains within
containers maintained by PyPA [1] to generate wheels that are runnable
on hosts that meet the platform compatibility tag [2] requirements.

By default, the script creates X86_64 and AArch64 CPython 3.9-3.12
wheels for glibc and musl libc based systems.

These defaults can be overridden via CIBW_* environment variables [3].

[0]: https://cibuildwheel.pypa.io/en/stable/
[1]: https://github.com/pypa/manylinux/
[2]: https://packaging.python.org/en/latest/specifications/platform-compatibility-tags/
[3]: https://cibuildwheel.pypa.io/en/stable/options/#options-summary

Signed-off-by: Vincent Fazio <vfazio@gmail.com>
Link: https://lore.kernel.org/r/20240611205041.1448276-1-vfazio@gmail.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
bindings/python/generate_pypi_artifacts.sh [new file with mode: 0755]