Skip to content

Commit adb4fd8

Browse files
Fixed wheel build process
1 parent 35911e5 commit adb4fd8

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

.github/workflows/build_wheels.yml

+1-4
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,12 @@ jobs:
2929
3030
- name: Install dependencies
3131
run: |
32-
set -a
33-
. ./dependency_versions
34-
set +a
3532
./docker/common/install-dependencies
3633
3734
- name: Python package
3835
run: |
3936
yum -y install zip
40-
./docker/common/manylinux-build-wheels
37+
LIBFRANKA_VERSION=${{ inputs.libfranka-version }} ./docker/common/manylinux-build-wheels
4138
4239
- name: Upload wheels
4340
uses: actions/upload-artifact@v3

docker/build/Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ RUN mkdir -p /build
2121
VOLUME /code
2222
VOLUME /build
2323
WORKDIR /build
24-
ADD docker/common/manylinux-build-wheels /usr/bin/build-wheels
24+
ADD docker/common/manylinux-build-wheels /usr/bin/manylinux-build-wheels
25+
ADD docker/build/build-wheels /usr/bin/
2526
ADD docker/build/run-tests /usr/bin/
2627

2728
# Cleaning up

docker/common/manylinux-build-wheels

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#!/bin/bash
22
set -e
33

4+
CODE_DIR="${1:-$(pwd)}"
5+
46
# Log python versions
57
echo "Found the following Python versions:"
68
for PYBIN in /opt/python/*/bin; do
@@ -10,14 +12,16 @@ for PYBIN in /opt/python/*/bin; do
1012
done
1113

1214
# Build python wheels
13-
mkdir -p wheels
15+
WHEELS_DIR="$(pwd)/wheels"
16+
mkdir -p "${WHEELS_DIR}"
1417
mkdir -p dist
1518
mkdir -p dist_full
1619

1720
# Compile wheels
1821
for PYBIN in /opt/python/*/bin; do
22+
PYBIN_NAME="$(basename "$(dirname "$PYBIN")")"
1923
if [[ "${PYBIN}" =~ ${PYBIN_SUPPORTED_VERSIONS} ]]; then
20-
"${PYBIN}/pip" wheel /code -w wheels/
24+
(mkdir -p "$PYBIN_NAME" && cd "$PYBIN_NAME" && "${PYBIN}/pip" wheel "$CODE_DIR" -w "${WHEELS_DIR}")
2125
fi
2226
done
2327

@@ -42,5 +46,4 @@ echo "Built the following wheels:"
4246
ls dist
4347

4448
mkdir -p output
45-
libfranka_version=${{ inputs.libfranka-version }}
46-
zip -r "output/libfranka_${libfranka_version//./-}_wheels.zip" dist/
49+
zip -r "output/libfranka_${LIBFRANKA_VERSION//./-}_wheels.zip" dist/

0 commit comments

Comments
 (0)