Mercurial > hg
comparison contrib/build-one-linux-wheel.sh @ 52243:4d825ad10840 stable
wheels: factor the core of Linux wheel building into a script
This will make it easy to reuse in the release process while making sure we
build the wheel the same way as in the CI.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 13 Nov 2024 04:20:54 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
52242:b8efa9013d3f | 52243:4d825ad10840 |
---|---|
1 #!/bin/bash | |
2 # build a single linux wheel within a prepared imaged based on manylinux images | |
3 # | |
4 # | |
5 # | |
6 set -eu | |
7 | |
8 # enforce that the translation are built | |
9 export MERCURIAL_SETUP_FORCE_TRANSLATIONS=1 | |
10 | |
11 if [ $# -lt 2 ]; then | |
12 echo "usage $0 PYTHONTAG DEST_DIR" >&2 | |
13 echo "" >&2 | |
14 echo 'PYTHONTAG should be of the form "cp310-cp310"' >&2 | |
15 exit 64 | |
16 fi | |
17 py_tag=$1 | |
18 destination_directory=$2 | |
19 | |
20 | |
21 tmp_wheel_dir=./tmp-wheelhouse | |
22 | |
23 if [ -e $tmp_wheel_dir ]; then | |
24 rm -rf $tmp_wheel_dir | |
25 fi | |
26 /opt/python/$py_tag/bin/python setup.py bdist_wheel --dist-dir $tmp_wheel_dir | |
27 # adjust it to make it universal | |
28 auditwheel repair $tmp_wheel_dir/*.whl -w $destination_directory |