@@ -67,12 +67,20 @@ for PYBIN in "${PYBINARIES[@]}"; do
6767 echo " PYTHON_LIBRARY:${PYTHON_LIBRARY} "
6868
6969 ${PYBIN} /pip install -r /work/requirements-dev.txt
70+ build_path=/work/ITK-$( basename $( dirname ${PYBIN} ) ) -manylinux1_${arch}
71+ # Clean up previous invocations
72+ rm -rf $build_path
7073 ${PYBIN} /python setup.py bdist_wheel --build-type MinSizeRel -G Ninja -- \
7174 -DITK_SOURCE_DIR:PATH=/work/standalone-${arch} -build/ITK-source \
75+ -DITK_BINARY_DIR:PATH=${build_path} \
7276 -DPYTHON_EXECUTABLE:FILEPATH=${PYTHON_EXECUTABLE} \
7377 -DPYTHON_INCLUDE_DIR:PATH=${PYTHON_INCLUDE_DIR} \
7478 -DPYTHON_LIBRARY:FILEPATH=${PYTHON_LIBRARY}
7579 ${PYBIN} /python setup.py clean
80+ # Remove unecessary files for building against ITK
81+ find $build_path -name ' *.cpp' -delete -o -name ' *.xml' -delete
82+ rm -rf $build_path /Wrapping/Generators/castxml*
83+ find $build_path -name ' *.o' -delete
7684done
7785
7886# Since there are no external shared libraries to bundle into the wheels
@@ -88,8 +96,8 @@ for PYBIN in "${PYBINARIES[@]}"; do
8896 echo " Skipping ${PYBIN} "
8997 continue
9098 fi
91- ${PYBIN} /pip install itk --user --no-cache-dir --no-index -f /work/dist
92- ${PYBIN} /pip install --user numpy
99+ sudo ${PYBIN} /pip install itk --no-cache-dir --no-index -f /work/dist
100+ sudo ${PYBIN} /pip install numpy
93101 (cd $HOME ; ${PYBIN} /python -c ' from itk import ITKCommon;' )
94102 (cd $HOME ; ${PYBIN} /python -c ' import itk; image = itk.Image[itk.UC, 2].New()' )
95103 (cd $HOME ; ${PYBIN} /python -c ' import itkConfig; itkConfig.LazyLoading = False; import itk;' )
0 commit comments