Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions scripts/macpython-download-cache-and-build-module-wheels.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,20 @@ brew update
brew install zstd aria2 gnu-tar doxygen ninja
brew upgrade cmake

if [[ $(arch) == "arm64" ]]; then
tarball_arch="-arm64"
else
tarball_arch=""
fi
# Fetch ITKPythonBuilds archive containing ITK build artifacts
echo "Fetching https://github.com/InsightSoftwareConsortium/ITKPythonBuilds/releases/download/${ITK_PACKAGE_VERSION:=v5.3.0}/ITKPythonBuilds-macosx.tar.zst"
if [[ ! -f ITKPythonBuilds-macosx.tar.zst ]]; then
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
echo "Fetching https://github.com/InsightSoftwareConsortium/ITKPythonBuilds/releases/download/${ITK_PACKAGE_VERSION:=v5.3.0}/ITKPythonBuilds-macosx${tarball_arch}.tar.zst"
if [[ ! -f ITKPythonBuilds-macosx${tarball_arch}.tar.zst ]]; then
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
fi
unzstd --long=31 ITKPythonBuilds-macosx.tar.zst -o ITKPythonBuilds-macosx.tar
PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH"
tar xf ITKPythonBuilds-macosx.tar --checkpoint=10000 --checkpoint-action=dot
rm ITKPythonBuilds-macosx.tar
unzstd --long=31 ITKPythonBuilds-macosx${tarball_arch}.tar.zst -o ITKPythonBuilds-macosx${tarball_arch}.tar
PATH="$(dirname $(brew list gnu-tar | grep gnubin)):$PATH"
tar xf ITKPythonBuilds-macosx${tarball_arch}.tar --checkpoint=10000 --checkpoint-action=dot
rm ITKPythonBuilds-macosx${tarball_arch}.tar

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