@@ -7,10 +7,12 @@ VERSION=$(shell python -c 'import re; f=open("fastrlock/__init__.py"); print(re.
77PYTHON_WITH_CYTHON =$(shell $(PYTHON ) -c 'import Cython.Compiler' >/dev/null 2>/dev/null && echo " --with-cython" || true)
88PY3_WITH_CYTHON =$(shell $(PYTHON3 ) -c 'import Cython.Compiler' >/dev/null 2>/dev/null && echo " --with-cython" || true)
99
10- MANYLINUX_IMAGE_X86_64 =quay.io/pypa/manylinux2010_x86_64
11- MANYLINUX_IMAGE_686 =quay.io/pypa/manylinux2010_i686
10+ MANYLINUX_IMAGES = \
11+ manylinux2010_x86_64 \
12+ manylinux2010_i686 \
13+ manylinux2014_aarch64
1214
13- .PHONY : all version inplace sdist build clean wheel_manylinux wheel_manylinux32 wheel_manylinux64 wheel
15+ .PHONY : all version inplace sdist build clean wheel_manylinux wheel
1416
1517all : inplace
1618
@@ -30,21 +32,25 @@ build:
3032wheel :
3133 $(PYTHON ) setup.py $(SETUPFLAGS ) bdist_wheel $(PYTHON_WITH_CYTHON )
3234
33- wheel_manylinux : sdist wheel_manylinux64 wheel_manylinux32
35+ qemu-user-static :
36+ docker run --rm --privileged hypriot/qemu-register
3437
35- wheel_manylinux32 wheel_manylinux64 : dist/$(PACKAGENAME ) -$(VERSION ) .tar.gz
38+ wheel_manylinux : sdist $(addprefix wheel_,$(MANYLINUX_IMAGES ) )
39+ $(addprefix wheel_,$(filter-out % _x86_64, $(filter-out % _i686, $(MANYLINUX_IMAGES ) ) ) ) : qemu-user-static
40+
41+ wheel_% : dist/$(PACKAGENAME ) -$(VERSION ) .tar.gz
3642 echo " Building wheels for $( PACKAGENAME) $( VERSION) "
3743 mkdir -p wheelhouse$(subst wheel_manylinux,,$@ )
3844 time docker run --rm -t \
3945 -v $(shell pwd) :/io \
4046 -e CFLAGS=" -O3 -g1 -mtune=generic -pipe -fPIC" \
4147 -e LDFLAGS=" $( LDFLAGS) -fPIC" \
4248 -e WHEELHOUSE=wheelhouse$(subst wheel_manylinux,,$@ ) \
43- $( if $( patsubst % 32 ,,$@ ) , $( MANYLINUX_IMAGE_X86_64 ) , $( MANYLINUX_IMAGE_686 ) ) \
49+ quay.io/pypa/ $( subst wheel_ ,,$@ ) \
4450 bash -c ' \
4551 rm -fr $(PACKAGENAME ) -$(VERSION ) /; \
4652 tar zxf /io/$< && cd $(PACKAGENAME ) -$(VERSION ) / || exit 1; \
47- for PYBIN in /opt/python/* /bin; do \
53+ for PYBIN in /opt/python/cp * /bin; do \
4854 PYVER=" $$ ($$ PYBIN/python -V)" ; \
4955 PROFDIR=" prof-$$ {PYVER// /_}" ; \
5056 echo $$ PYVER; \
0 commit comments