Skip to content

Commit 94351eb

Browse files
committed
ENH: Add manylinux-build-wheels script
## Step 1: Download dockcross/manylinux-x64 ``` docker pull dockcross/manylinux-x64 docker run dockcross/manylinux-x64 > ~/bin/dockcross-manylinux-x64 chmod u+x ~/bin/dockcross-manylinux-x64 ``` ## Step 2: Build wheels ``` git clone git://github.com/jcfr/SimpleITKPythonPackage.git cd SimpleITKPythonPackage dockcross-manylinux-x64 ./scripts/manylinux-build-wheels.sh ```
1 parent d6ad7d6 commit 94351eb

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

scripts/manylinux-build-wheels.sh

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/bin/bash
2+
set -e -x
3+
4+
# Build standalone project and populate archive cache
5+
mkdir -p /work/standalone-build
6+
pushd /work/standalone-build > /dev/null 2>&1
7+
cmake -DSimpleITKPythonPackage_BUILD_PYTHON:PATH=0 -G Ninja ../
8+
ninja
9+
popd > /dev/null 2>&1
10+
11+
# Compile wheels re-using standalone project and archive cache
12+
for PYBIN in /opt/python/*/bin; do
13+
if [[ ${PYBIN} == *"cp26"* ]]; then
14+
echo "Skipping ${PYBIN}"
15+
continue
16+
fi
17+
${PYBIN}/pip install --user -r /work/requirements-dev.txt
18+
${PYBIN}/python setup.py bdist_wheel -- \
19+
-DSimpleITK_DIR:PATH=/work/standalone-build/SimpleITK-superbuild/SimpleITK-build \
20+
-DSWIG_EXECUTABLE:PATH=/work/standalone-build/SimpleITK-superbuild/Swig/bin/swig
21+
${PYBIN}/python setup.py clean
22+
done
23+
24+
# Since there are no external shared libraries to bundle into the wheels
25+
# this step will fixup the wheel switching from 'linux' to 'manylinux1' tag
26+
for whl in dist/*.whl; do
27+
auditwheel repair $whl -w /work/dist/
28+
rm $whl
29+
done
30+

0 commit comments

Comments
 (0)