diff --git a/.travis.yml b/.travis.yml index 511d7af2..d16ff6a4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -57,6 +57,10 @@ jobs: virt: vm group: edge env: POLICY="musllinux_1_2" PLATFORM="aarch64" + - arch: arm64-graviton2 + virt: vm + group: edge + env: POLICY="musllinux_1_2" PLATFORM="armv7l" - arch: s390x env: POLICY="musllinux_1_2" PLATFORM="s390x" - arch: ppc64le diff --git a/README.rst b/README.rst index f1b35a36..ea82f4d3 100644 --- a/README.rst +++ b/README.rst @@ -184,6 +184,7 @@ Toolchain: GCC 13 - aarch64 image: ``quay.io/pypa/musllinux_1_2_aarch64`` - ppc64le image: ``quay.io/pypa/musllinux_1_2_ppc64le`` - s390x image: ``quay.io/pypa/musllinux_1_2_s390x`` +- armv7l image: ``quay.io/pypa/musllinux_1_2_armv7l`` musllinux_1_1 (Alpine Linux 2.12 based) diff --git a/build.sh b/build.sh index e663ccee..ccc5d593 100755 --- a/build.sh +++ b/build.sh @@ -27,6 +27,9 @@ elif [ "${PLATFORM}" == "ppc64le" ]; then elif [ "${PLATFORM}" == "s390x" ]; then GOARCH="s390x" MULTIARCH_PREFIX="s390x/" +elif [ "${PLATFORM}" == "armv7l" ]; then + GOARCH="arm/v7" + MULTIARCH_PREFIX="arm32v7/" else echo "Unsupported platform: '${PLATFORM}'" exit 1 diff --git a/docker/build_scripts/build-cpython.sh b/docker/build_scripts/build-cpython.sh index ea7485a9..0eae0e62 100755 --- a/docker/build_scripts/build-cpython.sh +++ b/docker/build_scripts/build-cpython.sh @@ -46,10 +46,14 @@ if [ "${CPYTHON_VERSION}" == "3.6.15" ]; then CFLAGS_EXTRA="${CFLAGS_EXTRA} -fno-tree-loop-vectorize -fno-tree-slp-vectorize" fi if [ "${AUDITWHEEL_POLICY}" == "manylinux2014" ] ; then - # Python 3.11+ + # Python 3.11+ export TCLTK_LIBS="-ltk8.6 -ltcl8.6" fi +if [ "${BASE_POLICY}_${AUDITWHEEL_ARCH}" == "musllinux_armv7l" ]; then + CONFIGURE_ARGS="${CONFIGURE_ARGS} --build=arm-linux-musleabihf" +fi + OPENSSL_PREFIX=$(find /opt/_internal -maxdepth 1 -name 'openssl*') if [ "${OPENSSL_PREFIX}" != "" ]; then CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-openssl=${OPENSSL_PREFIX}" diff --git a/docker/build_scripts/finalize.sh b/docker/build_scripts/finalize.sh index b266f68e..8d7bd60e 100755 --- a/docker/build_scripts/finalize.sh +++ b/docker/build_scripts/finalize.sh @@ -80,10 +80,12 @@ pipx upgrade-shared --pip-args="--no-index --find-links=/tmp/pinned-wheels" # install other tools with pipx for TOOL_PATH in $(find ${MY_DIR}/requirements-tools -type f); do TOOL=$(basename ${TOOL_PATH}) - # uv doesn't provide musl s390x wheels due to Rust issues - if [[ "${TOOL}" != "uv" || "${BASE_POLICY}-${AUDITWHEEL_ARCH}" != "musllinux-s390x" ]]; then - pipx install --pip-args="--require-hashes -r ${TOOL_PATH} --only-binary" ${TOOL} - fi + case ${AUDITWHEEL_PLAT}-${TOOL} in + musllinux*_armv7l-swig) apk add --no-cache swig;; + musllinux*_armv7l-cmake) apk add --no-cache cmake;; + musllinux*_s390x-uv) continue;; # uv doesn't provide musl s390x wheels due to Rust issues + *) pipx install --pip-args="--require-hashes -r ${TOOL_PATH} --only-binary" ${TOOL};; + esac done # We do not need the precompiled .pyc and .pyo files. diff --git a/docker/manylinux-entrypoint b/docker/manylinux-entrypoint index 973f1e60..bbe06c0a 100755 --- a/docker/manylinux-entrypoint +++ b/docker/manylinux-entrypoint @@ -4,6 +4,11 @@ set -eu if [ "${AUDITWHEEL_ARCH}" == "i686" ] && [ "$(uname -m)" == "x86_64" ]; then linux32 "$@" +elif [ "${AUDITWHEEL_ARCH}" == "armv7l" ] && [ "$(uname -m)" != "armv7l" ]; then + if [ "$(linux32 uname -m)" == "armv8l" ]; then + export _PYTHON_HOST_PLATFORM="linux_armv7l" + fi + linux32 "$@" else exec "$@" fi diff --git a/tests/run_tests.sh b/tests/run_tests.sh index b1777b95..61bdf85a 100755 --- a/tests/run_tests.sh +++ b/tests/run_tests.sh @@ -100,8 +100,9 @@ for PYTHON in /opt/python/*/bin/python; do echo "invalid answer, expecting 42" exit 1 fi - if [ "${PYVERS}" != "3.6" ] && [ "${PYVERS}" != "3.7" ] && [ "${IMPLEMENTATION}" != "graalpy" ] && [ "${AUDITWHEEL_POLICY:0:9}_${AUDITWHEEL_ARCH}" != "musllinux_s390x" ] && [ "${AUDITWHEEL_ARCH}" != "ppc64le" ]; then + if [ "${PYVERS}" != "3.6" ] && [ "${PYVERS}" != "3.7" ] && [ "${IMPLEMENTATION}" != "graalpy" ] && [ "${AUDITWHEEL_POLICY:0:9}_${AUDITWHEEL_ARCH}" != "musllinux_s390x" ] && [ "${AUDITWHEEL_ARCH}" != "ppc64le" ] && [ "${AUDITWHEEL_ARCH}" != "armv7l" ]; then # no uv on musllinux s390x + # FIXME, armv7l test fails on Travis CI but works with qemu (maybe armv8l vs armv7l ?) # FIXME, ppc64le test fails on Travis CI but works with qemu UV_PYTHON=/tmp/uv-test-${IMPLEMENTATION}${PYVERS}/bin/python uv venv --python ${PYTHON} /tmp/uv-test-${IMPLEMENTATION}${PYVERS}