From 5ed962feb4bf0fd31b05bb6203f7f4b5b18d80ce Mon Sep 17 00:00:00 2001 From: Tim Schneider Date: Tue, 28 May 2024 00:07:18 +0200 Subject: [PATCH] Fixed wheel build process --- docker/build/Dockerfile | 3 ++- docker/common/manylinux-build-wheels | 8 ++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/docker/build/Dockerfile b/docker/build/Dockerfile index afd7b1f3..14f329cd 100644 --- a/docker/build/Dockerfile +++ b/docker/build/Dockerfile @@ -21,7 +21,8 @@ RUN mkdir -p /build VOLUME /code VOLUME /build WORKDIR /build -ADD docker/common/manylinux-build-wheels /usr/bin/build-wheels +ADD docker/common/manylinux-build-wheels /usr/bin/manylinux-build-wheels +ADD docker/build/build-wheels /usr/bin/ ADD docker/build/run-tests /usr/bin/ # Cleaning up diff --git a/docker/common/manylinux-build-wheels b/docker/common/manylinux-build-wheels index 7cdfe255..58b726f3 100755 --- a/docker/common/manylinux-build-wheels +++ b/docker/common/manylinux-build-wheels @@ -1,6 +1,8 @@ #!/bin/bash set -e +CODE_DIR="${1:-$(pwd)}" + # Log python versions echo "Found the following Python versions:" for PYBIN in /opt/python/*/bin; do @@ -10,14 +12,16 @@ for PYBIN in /opt/python/*/bin; do done # Build python wheels -mkdir -p wheels +WHEELS_DIR="$(pwd)/wheels" +mkdir -p "${WHEELS_DIR}" mkdir -p dist mkdir -p dist_full # Compile wheels for PYBIN in /opt/python/*/bin; do + PYBIN_NAME="$(basename "$(dirname "$PYBIN")")" if [[ "${PYBIN}" =~ ${PYBIN_SUPPORTED_VERSIONS} ]]; then - "${PYBIN}/pip" wheel /code -w wheels/ + (mkdir -p "$PYBIN_NAME" && cd "$PYBIN_NAME" && "${PYBIN}/pip" wheel "$CODE_DIR" -w "${WHEELS_DIR}") fi done