diff --git a/pypi/projects/black/black-23.7.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl b/pypi/projects/black/black-23.7.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl new file mode 100644 index 0000000..c7c72af --- /dev/null +++ b/pypi/projects/black/black-23.7.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7513127d3563accc21cc174f970e947eb13ef32c11201d54f6ca477cc24d64eb +size 1492076 diff --git a/pypi/projects/black/black-23.9.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl b/pypi/projects/black/black-23.9.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl new file mode 100644 index 0000000..8cd64d1 --- /dev/null +++ b/pypi/projects/black/black-23.9.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fa90664abb626d5cf376faa5901fce7d2d0a1f91df4ac92600b8ee127b14a7ac +size 1501837 diff --git a/pypi/projects/black/build.md b/pypi/projects/black/build.md new file mode 100644 index 0000000..a025888 --- /dev/null +++ b/pypi/projects/black/build.md @@ -0,0 +1,43 @@ +# Building mypyc-compiled Black binary wheels + +This boosts the performance of the Black formatter, though having the binary wheels are optional. + +```console +$ git clone https://github.com/psf/black +$ git checkout ${RELEASE_TAG} +``` + +Then install some build prerequisites in a venv: + +```console +$ pip install hatch hatch-vcs hatch-fancy-pypi-readme hatch-mypyc auditwheel +$ sudo apt-get install -y patchelf +``` + +Check if the version is cleanly recognized: + +```console +$ hatch version +``` + +Run the mypyc build. +This step takes about *2-3 minutes* at an aarch64 Linux VM running on an Apple Silicon (M1, arm64) machine. + +```console +$ HATCH_BUILD_HOOKS_ENABLE=1 hatch build -t wheel +``` + +Rename the wheel file to be a "vanilla" linux wheel so that `auditwheel` can correct the platofrm tag. +(Apply your `RELEASE_TAG` version in the filenames instead of `23.7.0`.) + +```console +$ mv dist/black-23.7.0-cp311-cp311-manylinux_2_35_aarch64.whl dist/black-23.7.0-cp311-cp311-linux_aarch64.whl +``` + +Repair the wheel to conform with the manylinux2014 platform. + +```console +$ docker run -u "$(id -u):$(id -g)" -i -t -v `pwd`:/io quay.io/pypa/manylinux2014_aarch64 auditwheel repair -w /io/dist /io/dist/black-23.7.0-cp311-cp311-linux_aarch64.whl +``` + +Copy the repaired wheel files inside the `dist` directory here once done.