Skip to content

Commit 3bf05d4

Browse files
authored
feature: add musllinux_1_2_armv7l (#1455)
1 parent ab73a4b commit 3bf05d4

File tree

7 files changed

+26
-6
lines changed

7 files changed

+26
-6
lines changed

Diff for: .travis.yml

+4
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ jobs:
5757
virt: vm
5858
group: edge
5959
env: POLICY="musllinux_1_2" PLATFORM="aarch64"
60+
- arch: arm64-graviton2
61+
virt: vm
62+
group: edge
63+
env: POLICY="musllinux_1_2" PLATFORM="armv7l"
6064
- arch: s390x
6165
env: POLICY="musllinux_1_2" PLATFORM="s390x"
6266
- arch: ppc64le

Diff for: README.rst

+1
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ Toolchain: GCC 13
184184
- aarch64 image: ``quay.io/pypa/musllinux_1_2_aarch64``
185185
- ppc64le image: ``quay.io/pypa/musllinux_1_2_ppc64le``
186186
- s390x image: ``quay.io/pypa/musllinux_1_2_s390x``
187+
- armv7l image: ``quay.io/pypa/musllinux_1_2_armv7l``
187188

188189

189190
musllinux_1_1 (Alpine Linux 2.12 based)

Diff for: build.sh

+3
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ elif [ "${PLATFORM}" == "ppc64le" ]; then
2727
elif [ "${PLATFORM}" == "s390x" ]; then
2828
GOARCH="s390x"
2929
MULTIARCH_PREFIX="s390x/"
30+
elif [ "${PLATFORM}" == "armv7l" ]; then
31+
GOARCH="arm/v7"
32+
MULTIARCH_PREFIX="arm32v7/"
3033
else
3134
echo "Unsupported platform: '${PLATFORM}'"
3235
exit 1

Diff for: docker/build_scripts/build-cpython.sh

+5-1
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,14 @@ if [ "${CPYTHON_VERSION}" == "3.6.15" ]; then
4646
CFLAGS_EXTRA="${CFLAGS_EXTRA} -fno-tree-loop-vectorize -fno-tree-slp-vectorize"
4747
fi
4848
if [ "${AUDITWHEEL_POLICY}" == "manylinux2014" ] ; then
49-
# Python 3.11+
49+
# Python 3.11+
5050
export TCLTK_LIBS="-ltk8.6 -ltcl8.6"
5151
fi
5252

53+
if [ "${BASE_POLICY}_${AUDITWHEEL_ARCH}" == "musllinux_armv7l" ]; then
54+
CONFIGURE_ARGS="${CONFIGURE_ARGS} --build=arm-linux-musleabihf"
55+
fi
56+
5357
OPENSSL_PREFIX=$(find /opt/_internal -maxdepth 1 -name 'openssl*')
5458
if [ "${OPENSSL_PREFIX}" != "" ]; then
5559
CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-openssl=${OPENSSL_PREFIX}"

Diff for: docker/build_scripts/finalize.sh

+6-4
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,12 @@ pipx upgrade-shared --pip-args="--no-index --find-links=/tmp/pinned-wheels"
8080
# install other tools with pipx
8181
for TOOL_PATH in $(find ${MY_DIR}/requirements-tools -type f); do
8282
TOOL=$(basename ${TOOL_PATH})
83-
# uv doesn't provide musl s390x wheels due to Rust issues
84-
if [[ "${TOOL}" != "uv" || "${BASE_POLICY}-${AUDITWHEEL_ARCH}" != "musllinux-s390x" ]]; then
85-
pipx install --pip-args="--require-hashes -r ${TOOL_PATH} --only-binary" ${TOOL}
86-
fi
83+
case ${AUDITWHEEL_PLAT}-${TOOL} in
84+
musllinux*_armv7l-swig) apk add --no-cache swig;;
85+
musllinux*_armv7l-cmake) apk add --no-cache cmake;;
86+
musllinux*_s390x-uv) continue;; # uv doesn't provide musl s390x wheels due to Rust issues
87+
*) pipx install --pip-args="--require-hashes -r ${TOOL_PATH} --only-binary" ${TOOL};;
88+
esac
8789
done
8890

8991
# We do not need the precompiled .pyc and .pyo files.

Diff for: docker/manylinux-entrypoint

+5
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ set -eu
44

55
if [ "${AUDITWHEEL_ARCH}" == "i686" ] && [ "$(uname -m)" == "x86_64" ]; then
66
linux32 "$@"
7+
elif [ "${AUDITWHEEL_ARCH}" == "armv7l" ] && [ "$(uname -m)" != "armv7l" ]; then
8+
if [ "$(linux32 uname -m)" == "armv8l" ]; then
9+
export _PYTHON_HOST_PLATFORM="linux_armv7l"
10+
fi
11+
linux32 "$@"
712
else
813
exec "$@"
914
fi

Diff for: tests/run_tests.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,9 @@ for PYTHON in /opt/python/*/bin/python; do
100100
echo "invalid answer, expecting 42"
101101
exit 1
102102
fi
103-
if [ "${PYVERS}" != "3.6" ] && [ "${PYVERS}" != "3.7" ] && [ "${IMPLEMENTATION}" != "graalpy" ] && [ "${AUDITWHEEL_POLICY:0:9}_${AUDITWHEEL_ARCH}" != "musllinux_s390x" ] && [ "${AUDITWHEEL_ARCH}" != "ppc64le" ]; then
103+
if [ "${PYVERS}" != "3.6" ] && [ "${PYVERS}" != "3.7" ] && [ "${IMPLEMENTATION}" != "graalpy" ] && [ "${AUDITWHEEL_POLICY:0:9}_${AUDITWHEEL_ARCH}" != "musllinux_s390x" ] && [ "${AUDITWHEEL_ARCH}" != "ppc64le" ] && [ "${AUDITWHEEL_ARCH}" != "armv7l" ]; then
104104
# no uv on musllinux s390x
105+
# FIXME, armv7l test fails on Travis CI but works with qemu (maybe armv8l vs armv7l ?)
105106
# FIXME, ppc64le test fails on Travis CI but works with qemu
106107
UV_PYTHON=/tmp/uv-test-${IMPLEMENTATION}${PYVERS}/bin/python
107108
uv venv --python ${PYTHON} /tmp/uv-test-${IMPLEMENTATION}${PYVERS}

0 commit comments

Comments
 (0)