Skip to content

Commit c208ebb

Browse files
authored
Merge pull request #272 from thewtex/macos-arm-remote
ENH: Support arm64 in macpython-download-cache-and-build-module-wheel…
2 parents fb8d57d + 81be125 commit c208ebb

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

scripts/macpython-download-cache-and-build-module-wheels.sh

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,20 @@ brew update
4242
brew install zstd aria2 gnu-tar doxygen ninja
4343
brew upgrade cmake
4444

45+
if [[ $(arch) == "arm64" ]]; then
46+
tarball_arch="-arm64"
47+
else
48+
tarball_arch=""
49+
fi
4550
# Fetch ITKPythonBuilds archive containing ITK build artifacts
46-
echo "Fetching https://github.com/InsightSoftwareConsortium/ITKPythonBuilds/releases/download/${ITK_PACKAGE_VERSION:=v5.3.0}/ITKPythonBuilds-macosx.tar.zst"
47-
if [[ ! -f ITKPythonBuilds-macosx.tar.zst ]]; then
48-
aria2c -c --file-allocation=none -o ITKPythonBuilds-macosx.tar.zst -s 10 -x 10 https://github.com/InsightSoftwareConsortium/ITKPythonBuilds/releases/download/${ITK_PACKAGE_VERSION:=v5.3.0}/ITKPythonBuilds-macosx.tar.zst
51+
echo "Fetching https://github.com/InsightSoftwareConsortium/ITKPythonBuilds/releases/download/${ITK_PACKAGE_VERSION:=v5.3.0}/ITKPythonBuilds-macosx${tarball_arch}.tar.zst"
52+
if [[ ! -f ITKPythonBuilds-macosx${tarball_arch}.tar.zst ]]; then
53+
aria2c -c --file-allocation=none -o ITKPythonBuilds-macosx${tarball_arch}.tar.zst -s 10 -x 10 https://github.com/InsightSoftwareConsortium/ITKPythonBuilds/releases/download/${ITK_PACKAGE_VERSION:=v5.3.0}/ITKPythonBuilds-macosx${tarball_arch}.tar.zst
4954
fi
50-
unzstd --long=31 ITKPythonBuilds-macosx.tar.zst -o ITKPythonBuilds-macosx.tar
51-
PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH"
52-
tar xf ITKPythonBuilds-macosx.tar --checkpoint=10000 --checkpoint-action=dot
53-
rm ITKPythonBuilds-macosx.tar
55+
unzstd --long=31 ITKPythonBuilds-macosx${tarball_arch}.tar.zst -o ITKPythonBuilds-macosx${tarball_arch}.tar
56+
PATH="$(dirname $(brew list gnu-tar | grep gnubin)):$PATH"
57+
tar xf ITKPythonBuilds-macosx${tarball_arch}.tar --checkpoint=10000 --checkpoint-action=dot
58+
rm ITKPythonBuilds-macosx${tarball_arch}.tar
5459

5560
# Optional: Update build scripts
5661
if [[ -n ${ITKPYTHONPACKAGE_TAG} ]]; then

0 commit comments

Comments
 (0)