-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathbuild_mac.sh
42 lines (38 loc) · 1.11 KB
/
build_mac.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/sh
python_directory="/Library/Frameworks/Python.framework/Versions"
python_versions=("3.7" "3.8" "3.9" "3.10" "3.11")
# dependencies
brew install cmake clang-format
ret_value=$?
if [ $ret_value -ne 0 ]; then
echo "Failed to install clang/clang-format..."
exit $ret_value
fi
# Stash any changes we don't have committed.
git stash
ret_value=$?
if [ $ret_value -ne 0 ]; then
echo "Failed to stash changes through git..."
exit $ret_value
fi
# Make sure all the python versions are installed
for version in "${python_versions[@]}"
do
python_exec="${python_directory}/${version}/bin/python3"
# echo $python_exec
$python_exec --version
echo "Installing python dependencies..."
$python_exec -m pip install wheel
ret_value=$?
if [ $ret_value -ne 0 ]; then
echo "Python requirements for ${version} failed!"
exit $ret_value
fi
echo "Building python ${version}..."
$python_exec setup.py bdist_wheel --universal
ret_value=$?
if [ $ret_value -ne 0 ]; then
echo "Builing python_ics module with Python ${version} failed!"
exit $ret_value
fi
done