Skip to content

Commit

Permalink
try entrypoint
Browse files Browse the repository at this point in the history
  • Loading branch information
mayeut committed Feb 26, 2023
1 parent 54b6061 commit e59ac58
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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} \
Expand Down
2 changes: 1 addition & 1 deletion docker/build_scripts/install-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 2 additions & 0 deletions docker/manylinux-entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit e59ac58

Please sign in to comment.