Skip to content

Commit 26d0b48

Browse files
authored
Merge pull request #256 from jcfr/fix-macos-packaging-using-scikit-build-greater-8.1
Fix macOS itk wheel size explicitly removing _skbuild directory
2 parents a046cde + d2b61db commit 26d0b48

File tree

3 files changed

+27
-4
lines changed

3 files changed

+27
-4
lines changed

scripts/macpython-build-common.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ for PYBIN in "${PYBINARIES[@]}"; do
6969
VENVS+=(${VENV})
7070
done
7171

72+
# -----------------------------------------------------------------------
73+
SKBUILD_DIR=_skbuild
74+
75+
7276
# -----------------------------------------------------------------------
7377
# Ensure that requirements are met
7478
brew update

scripts/macpython-build-module-wheels.sh

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,17 @@ fi
4545
# -----------------------------------------------------------------------
4646
# These variables are set in common script:
4747
#
48+
# * CMAKE_EXECUTABLE
49+
# * CMAKE_OPTIONS
50+
# * MACPYTHON_PY_PREFIX
51+
# * PYBINARIES
52+
# * PYTHON_VERSIONS
53+
# * NINJA_EXECUTABLE
54+
# * SCRIPT_DIR
55+
# * SKBUILD_DIR
56+
# * VENVS=()
57+
4858
MACPYTHON_PY_PREFIX=""
49-
# PYBINARIES="" # unused
5059
SCRIPT_DIR=""
5160
VENVS=()
5261

@@ -105,7 +114,7 @@ for VENV in "${VENVS[@]}"; do
105114
-DPython3_INCLUDE_DIR:PATH=${Python3_INCLUDE_DIR} \
106115
${CMAKE_OPTIONS} \
107116
|| exit 1
108-
# ${Python3_EXECUTABLE} setup.py clean # Permission denied
117+
# rm -r ${SKBUILD_DIR} # Permission denied
109118
done
110119

111120
for wheel in $PWD/dist/*.whl; do

scripts/macpython-build-wheels.sh

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,16 @@
1919
# -----------------------------------------------------------------------
2020
# These variables are set in common script:
2121
#
22+
# * CMAKE_EXECUTABLE
23+
# * CMAKE_OPTIONS
24+
# * MACPYTHON_PY_PREFIX
25+
# * PYBINARIES
26+
# * PYTHON_VERSIONS
27+
# * NINJA_EXECUTABLE
28+
# * SCRIPT_DIR
29+
# * SKBUILD_DIR
30+
# * VENVS=()
31+
2232
MACPYTHON_PY_PREFIX=""
2333
PYBINARIES=""
2434
SCRIPT_DIR=""
@@ -136,7 +146,7 @@ for VENV in "${VENVS[@]}"; do
136146
-DITK_WRAP_DOC:BOOL=ON \
137147
${CMAKE_OPTIONS}
138148
# Cleanup
139-
${Python3_EXECUTABLE} setup.py clean
149+
rm -r ${SKBUILD_DIR}
140150

141151
else
142152

@@ -199,7 +209,7 @@ for VENV in "${VENVS[@]}"; do
199209
${CMAKE_OPTIONS} \
200210
|| exit 1
201211
# Cleanup
202-
${Python3_EXECUTABLE} setup.py clean
212+
rm -r ${SKBUILD_DIR}
203213
done
204214

205215
fi

0 commit comments

Comments
 (0)