Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: add musllinux_1_2_armv7l #1455

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
30 changes: 1 addition & 29 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,35 +25,7 @@ jobs:
- arch: arm64-graviton2
virt: vm
group: edge
env: POLICY="manylinux2014" PLATFORM="aarch64"
- arch: s390x
env: POLICY="manylinux2014" PLATFORM="s390x"
- arch: ppc64le
env: POLICY="manylinux2014" PLATFORM="ppc64le"
- arch: arm64-graviton2
virt: vm
group: edge
env: POLICY="manylinux_2_28" PLATFORM="aarch64"
- arch: s390x
env: POLICY="manylinux_2_28" PLATFORM="s390x"
- arch: ppc64le
env: POLICY="manylinux_2_28" PLATFORM="ppc64le"
- arch: arm64-graviton2
virt: vm
group: edge
env: POLICY="musllinux_1_1" PLATFORM="aarch64"
- arch: s390x
env: POLICY="musllinux_1_1" PLATFORM="s390x"
- arch: ppc64le
env: POLICY="musllinux_1_1" PLATFORM="ppc64le"
- arch: arm64-graviton2
virt: vm
group: edge
env: POLICY="musllinux_1_2" PLATFORM="aarch64"
- arch: s390x
env: POLICY="musllinux_1_2" PLATFORM="s390x"
- arch: ppc64le
env: POLICY="musllinux_1_2" PLATFORM="ppc64le"
env: POLICY="musllinux_1_2" PLATFORM="armv7l"

before_install:
- if [ -d "${HOME}/buildx-cache/.buildx-cache-${POLICY}_${PLATFORM}" ]; then cp -rlf ${HOME}/buildx-cache/.buildx-cache-${POLICY}_${PLATFORM} ./; fi
Expand Down
9 changes: 9 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +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 @@ -89,6 +97,7 @@ elif [ "${MANYLINUX_BUILD_FRONTEND}" == "podman" ]; then
elif [ "${MANYLINUX_BUILD_FRONTEND}" == "docker-buildx" ]; then
USE_LOCAL_CACHE=1
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},mode=max \
Expand Down
6 changes: 5 additions & 1 deletion docker/build_scripts/build-cpython.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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="--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}"
Expand Down
6 changes: 6 additions & 0 deletions docker/build_scripts/finalize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ export SSL_CERT_FILE=/opt/_internal/certs.pem
pushd $MY_DIR/requirements-tools
for TOOL_PATH in $(find . -type f); do
TOOL=$(basename ${TOOL_PATH})
if [ "${AUDITWHEEL_ARCH}" == "armv7l" ]; then
case ${TOOL} in
swig) apk add --no-cache swig; continue;;
cmake) apk add --no-cache cmake; continue;;
esac
fi
pipx install --pip-args="--require-hashes -r" ${TOOL}
done
popd
Expand Down
5 changes: 5 additions & 0 deletions docker/manylinux-entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -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
Comment on lines +8 to +10
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is really a hugly hack and should not be required for the image to be usable IMHO.

linux32 "$@"
else
exec "$@"
fi