contrib/build-one-linux-wheel.sh
author Pierre Augier <pierre.augier@univ-grenoble-alpes.fr>
Mon, 13 Jan 2025 16:44:23 +0100
changeset 52685 1ce66ca747fc
parent 52239 4d825ad10840
child 52729 8d4ec768aff4
permissions -rwxr-xr-x
wheels: use PyPA build

#!/bin/bash
# build a single linux wheel within a prepared imaged based on manylinux images
#
#
#
set -eu

# enforce that the translation are built
export MERCURIAL_SETUP_FORCE_TRANSLATIONS=1

if [ $# -lt 2 ]; then
    echo "usage $0 PYTHONTAG DEST_DIR" >&2
    echo "" >&2
    echo 'PYTHONTAG should be of the form "cp310-cp310"' >&2
    exit 64
fi
py_tag=$1
destination_directory=$2


tmp_wheel_dir=./tmp-wheelhouse

if [ -e $tmp_wheel_dir ]; then
    rm -rf $tmp_wheel_dir
fi
/opt/python/$py_tag/bin/python -m pip install build
/opt/python/$py_tag/bin/python -m build --outdir $tmp_wheel_dir
# adjust it to make it universal
auditwheel repair $tmp_wheel_dir/*.whl -w $destination_directory