From b05641b09464bd5591eda802d8091bc98de08f73 Mon Sep 17 00:00:00 2001 From: Tim Schneider Date: Tue, 28 May 2024 00:18:59 +0200 Subject: [PATCH] Fixed wheel build process --- docker/build/Dockerfile | 3 ++- docker/common/manylinux-build-wheels | 11 +++++++---- 2 files changed, 9 insertions(+), 5 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..4d05ba35 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 @@ -42,5 +46,4 @@ echo "Built the following wheels:" ls dist mkdir -p output -libfranka_version=${{ inputs.libfranka-version }} -zip -r "output/libfranka_${libfranka_version//./-}_wheels.zip" dist/ \ No newline at end of file +zip -r "output/libfranka_${LIBFRANKA_VERSION//./-}_wheels.zip" dist/ \ No newline at end of file