Skip to content

Commit 8a588e1

Browse files
committed
manylinux-build-wheels: Add support for both x86 and x64 manylinux
1 parent f517b50 commit 8a588e1

2 files changed

Lines changed: 25 additions & 5 deletions

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
scripts/manylinux-libpython-not-needed-symbols-exported-by-interpreter
33
skbuild
44
standalone-build
5+
standalone-x86-build
6+
standalone-x64-build
57

68
# Python
79
*.py[cod]

scripts/manylinux-build-wheels.sh

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,27 @@
11
#!/bin/bash
22
set -e -x
33

4+
# i686 or x86_64 ?
5+
case $(uname -p) in
6+
i686)
7+
arch=x86
8+
break
9+
;;
10+
x86_64)
11+
arch=x64
12+
break
13+
;;
14+
*)
15+
die "Unknown architecture $(uname -p)"
16+
break
17+
;;
18+
esac
19+
20+
echo "Building wheels for $arch"
21+
422
# Build standalone project and populate archive cache
5-
mkdir -p /work/standalone-build
6-
pushd /work/standalone-build > /dev/null 2>&1
23+
mkdir -p /work/standalone-${arch}-build
24+
pushd /work/standalone-${arch}-build > /dev/null 2>&1
725
cmake -DSimpleITKPythonPackage_BUILD_PYTHON:PATH=0 -G Ninja ../
826
ninja
927
popd > /dev/null 2>&1
@@ -41,9 +59,9 @@ for PYBIN in /opt/python/*/bin; do
4159

4260
${PYBIN}/pip install --user -r /work/requirements-dev.txt
4361
${PYBIN}/python setup.py bdist_wheel -G Ninja -- \
44-
-DSimpleITK_DIR:PATH=/work/standalone-build/SimpleITK-superbuild/SimpleITK-build \
45-
-DSimpleITK_SOURCE_DIR:PATH=/work/standalone-build/SimpleITK \
46-
-DSWIG_EXECUTABLE:FILEPATH=/work/standalone-build/SimpleITK-superbuild/Swig/bin/swig \
62+
-DSimpleITK_DIR:PATH=/work/standalone-${arch}-build/SimpleITK-superbuild/SimpleITK-build \
63+
-DSimpleITK_SOURCE_DIR:PATH=/work/standalone-${arch}-build/SimpleITK \
64+
-DSWIG_EXECUTABLE:FILEPATH=/work/standalone-${arch}-build/SimpleITK-superbuild/Swig/bin/swig \
4765
-DPYTHON_EXECUTABLE:FILEPATH=${PYTHON_EXECUTABLE} \
4866
-DPYTHON_INCLUDE_DIR:PATH=${PYTHON_INCLUDE_DIR} \
4967
-DPYTHON_LIBRARY:FILEPATH=${PYTHON_LIBRARY}

0 commit comments

Comments
 (0)