Skip to content

Commit 50a0b59

Browse files
committed
Use dockcross for aarch64 wheel
1 parent 23852aa commit 50a0b59

File tree

3 files changed

+12
-15
lines changed

3 files changed

+12
-15
lines changed

.github/workflows/PyPI-publishing.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,9 @@ jobs:
111111
chmod +x ./dockcross
112112
./dockcross bindings/python/build_wheel.sh
113113
elif [ ${{ matrix.config.name }} == 'manylinux2014_aarch64' ]; then
114-
docker run --rm -v `pwd`/:/work quay.io/pypa/manylinux2014_aarch64 bash /work/bindings/python/build_wheel_aarch64.sh
114+
docker run --rm -v `pwd`/:/work dockcross/manylinux2014-aarch64 > ./dockcross
115+
chmod +x ./dockcross
116+
./dockcross bindings/python/build_wheel.sh --plat-name manylinux2014_aarch64
115117
elif [ ${{ matrix.config.name }} == 'manylinux2014_x86_64' ]; then
116118
docker run --rm -v `pwd`/:/work dockcross/manylinux2014-x64 > ./dockcross
117119
chmod +x ./dockcross

bindings/python/build_wheel.sh

+9-4
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,15 @@ cd bindings/python
55

66
# Compile wheels
77
if [ -f /opt/python/cp36-cp36m/bin/python ];then
8-
/opt/python/cp36-cp36m/bin/python setup.py bdist_wheel
8+
/opt/python/cp36-cp36m/bin/python setup.py bdist_wheel $@
99
else
10-
python3 setup.py bdist_wheel
10+
python3 setup.py bdist_wheel $@
1111
fi
1212
cd dist
13-
auditwheel repair *.whl
14-
mv -f wheelhouse/*.whl .
13+
14+
# We can't repair an aarch64 wheel on x64 hosts
15+
# https://github.com/pypa/auditwheel/issues/244
16+
if [[ ! "$*" =~ "aarch64" ]];then
17+
auditwheel repair *.whl
18+
mv -f wheelhouse/*.whl .
19+
fi

bindings/python/build_wheel_aarch64.sh

-10
This file was deleted.

0 commit comments

Comments
 (0)