Skip to content

Commit 699a5f0

Browse files
committed
macosx: create module build tree resources
1 parent fd0d4b2 commit 699a5f0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

scripts/macpython-build-wheels.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,23 @@ for VENV in "${VENVS[@]}"; do
7878
echo "PYTHON_LIBRARY:${PYTHON_LIBRARY}"
7979

8080
$PYTHON_EXECUTABLE -m pip install -r ${SCRIPT_DIR}/../requirements-dev.txt
81+
build_path="${SCRIPT_DIR}/../ITK-${py_mm}-macosx_x86_64"
82+
# Clean up previous invocations
83+
rm -rf $build_path
8184
$PYTHON_EXECUTABLE setup.py bdist_wheel --build-type MinSizeRel --plat-name macosx-10.6-x86_64 -G Ninja -- \
8285
-DCMAKE_MAKE_PROGRAM:FILEPATH=${NINJA_EXECUTABLE} \
8386
-DITK_SOURCE_DIR:PATH=${SCRIPT_DIR}/../standalone-build/ITK-source \
87+
-DITK_BINARY_DIR:PATH=${build_path} \
8488
-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.6 \
8589
-DCMAKE_OSX_ARCHITECTURES:STRING=x86_64 \
8690
-DPYTHON_EXECUTABLE:FILEPATH=${PYTHON_EXECUTABLE} \
8791
-DPYTHON_INCLUDE_DIR:PATH=${PYTHON_INCLUDE_DIR} \
8892
-DPYTHON_LIBRARY:FILEPATH=${PYTHON_LIBRARY}
8993
$PYTHON_EXECUTABLE setup.py clean
94+
# Remove unecessary files for building against ITK
95+
find $build_path -name '*.cpp' -delete -o -name '*.xml' -delete
96+
rm -rf $build_path/Wrapping/Generators/castxml*
97+
find $build_path -name '*.o' -delete
9098
done
9199

92100
$DELOCATE_LISTDEPS ${SCRIPT_DIR}/../dist/*.whl # lists library dependencies

0 commit comments

Comments
 (0)