-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBuildMacOSWheels.sh
42 lines (34 loc) · 1.68 KB
/
BuildMacOSWheels.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
export ITK_PACKAGE_VERSION=v5.0rc01
# Fetch script from https://rawgit.com/InsightSoftwareConsortium/ITKPythonPackage
if ! test -e /Users/kitware/Dashboards/ITK
then
mkdir -p /Users/kitware/Dashboards/ITK
cd /Users/kitware/Dashboards/ITK
curl -L https://raw.githubusercontent.com/InsightSoftwareConsortium/ITKPythonPackage/master/scripts/macpython-download-cache-and-build-module-wheels.sh -O
chmod u+x macpython-download-cache-and-build-module-wheels.sh
sed -i "" -e "s|\(.*\){ITK_PACKAGE_VERSION:=v5.0b01}\(.*\)|\1{ITK_PACKAGE_VERSION:=${ITK_PACKAGE_VERSION}}\2|g" \
macpython-download-cache-and-build-module-wheels.sh
sed -i "" -e "s|.*macpython-build-module-wheels.sh .*||g" \
macpython-download-cache-and-build-module-wheels.sh
./macpython-download-cache-and-build-module-wheels.sh
for i in /Users/kitware/Dashboards/ITK/ITKPythonPackage/venvs/*/bin/python
do
$i -m pip install scikit-build
done
fi
#sed -i "" "s/\/Users\/Kitware\/Dashboards\/ITK/$(pwd | sed "s/\//\\\\\//g")/g" macpython-download-cache-and-build-module-wheels.sh
# This script should lie in a directory alongside with the RTK sources
cd /Users/kitware/Dashboards
if ! test -e RTK
then
git clone https://github.com/SimonRit/RTK.git
fi
cd RTK
# Add CMake options for building the module
after_line='-DBUILD_TESTING:BOOL=OFF'
rtk_build_applications='-DRTK_BUILD_APPLICATIONS:BOOL=OFF \\'
sed -i -e "s|$after_line.*$|$after_line $rtk_build_applications|g" \
/Users/kitware/Dashboards/ITK/ITKPythonPackage/scripts/macpython-build-module-wheels.sh
# Finally build Linux wheels
/Users/kitware/Dashboards/ITK/ITKPythonPackage/scripts/macpython-build-module-wheels.sh