diff --git a/.travis.yml b/.travis.yml index 06adabcf9..cf524b864 100644 --- a/.travis.yml +++ b/.travis.yml @@ -38,6 +38,8 @@ install: - ./travisci-install-buildx.sh script: | + docker run --rm arm32v7/python:3.11-alpine linux32 /usr/local/bin/python3.11 -c 'import distutils.util; print(distutils.util.get_platform())' + docker run --rm arm32v7/python:3.11-alpine linux32 /bin/sh -c '/usr/local/bin/python3.11 -m sysconfig | grep arm' (while true; do echo "travis_wait"; docker stats --no-stream; free; df -h; sleep 30; done) & WAIT_PID=$! COMMIT_SHA=${TRAVIS_COMMIT} ./build.sh diff --git a/build.sh b/build.sh index 78e4b60ac..0e1716b5b 100755 --- a/build.sh +++ b/build.sh @@ -14,16 +14,22 @@ export PLATFORM # get docker default multiarch image prefix for PLATFORM if [ "${PLATFORM}" == "x86_64" ]; then MULTIARCH_PREFIX="amd64/" + BUILDX_PLATFORM="linux/amd64" elif [ "${PLATFORM}" == "i686" ]; then MULTIARCH_PREFIX="i386/" + BUILDX_PLATFORM="linux/386" elif [ "${PLATFORM}" == "aarch64" ]; then MULTIARCH_PREFIX="arm64v8/" + BUILDX_PLATFORM="linux/arm64/v8" elif [ "${PLATFORM}" == "ppc64le" ]; then MULTIARCH_PREFIX="ppc64le/" + BUILDX_PLATFORM="linux/ppc64le" elif [ "${PLATFORM}" == "s390x" ]; then MULTIARCH_PREFIX="s390x/" + BUILDX_PLATFORM="linux/s390x" elif [ "${PLATFORM}" == "armv7l" ]; then MULTIARCH_PREFIX="arm32v7/" + BUILDX_PLATFORM="linux/arm/v7" else echo "Unsupported platform: '${PLATFORM}'" exit 1 @@ -82,6 +88,7 @@ if [ "${MANYLINUX_BUILD_FRONTEND}" == "docker" ]; then docker build ${BUILD_ARGS_COMMON} elif [ "${MANYLINUX_BUILD_FRONTEND}" == "docker-buildx" ]; then docker buildx build \ + --platform ${BUILDX_PLATFORM} \ --load \ --cache-from=type=local,src=$(pwd)/.buildx-cache-${POLICY}_${PLATFORM} \ --cache-to=type=local,dest=$(pwd)/.buildx-cache-staging-${POLICY}_${PLATFORM} \ diff --git a/docker/build_scripts/install-entrypoint.sh b/docker/build_scripts/install-entrypoint.sh index 9ef1e9914..7abdfcc02 100755 --- a/docker/build_scripts/install-entrypoint.sh +++ b/docker/build_scripts/install-entrypoint.sh @@ -24,5 +24,5 @@ if [ "${AUDITWHEEL_PLAT}" = "manylinux2014_i686" ]; then fi if [ "${AUDITWHEEL_POLICY}" = "musllinux_1_1" ]; then - apk add --no-cache bash + apk add --no-cache bash util-linux fi diff --git a/docker/manylinux-entrypoint b/docker/manylinux-entrypoint index 06ea40efa..9121c6543 100755 --- a/docker/manylinux-entrypoint +++ b/docker/manylinux-entrypoint @@ -4,6 +4,8 @@ set -eu if [ "${AUDITWHEEL_ARCH}" == "i686" ]; then linux32 "$@" +elif [ "${AUDITWHEEL_ARCH}" == "armv7l" ] && [ "$(uname -m)" != "armv7l" ]; then + setarch armv7l "$@" else exec "$@" fi