-
Notifications
You must be signed in to change notification settings - Fork 79
Expand file tree
/
Copy pathbuild_macos.sh
More file actions
executable file
·48 lines (39 loc) · 1.54 KB
/
build_macos.sh
File metadata and controls
executable file
·48 lines (39 loc) · 1.54 KB
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
43
44
45
46
47
48
#!/bin/bash
set -e
set -u
# this is verbose remove
set -x
export CMAKE="cmake"
export CMAKE_CXX_FLAGS=""
export CC=clang;
export CXX=clang++;
export F77="";
export ARCH_ARG="-DCMAKE_OSX_ARCHITECTURES=arm64"
export PLAT_NAME="arm64"
#FULL_PLAT_NAME=${PLAT_NAME}
export PYTHON3_BIN=/opt/homebrew/bin/python3
export PIP_BIN=pip
${PYTHON3_BIN} -mvenv venv
source venv/bin/activate
#export MACOSX_DEPLOYMENT_TARGET=12.0
${PIP_BIN} install wheel
export PYTHON3_INCLUDE=$(${PYTHON3_BIN} -c "from sysconfig import get_paths as gp; print(gp()['include'])")
export PYTHON3_ARCHIVE=""
#For macOS, the Xcode command line developer tools should be installed, these contain all the necessary libraries. The math libraries are from the Apple Accelerate Framework. Note that a FORTRAN compiler is not required.
#https://developer.apple.com/technologies/tools
#https://developer.apple.com/performance/accelerateframework.html
# SYMDIFF build
(cd external/symdiff && bash ../symdiff_macos.sh && cd osx_release && make -j3)
# umfpack support
(cd external/umfpack_lgpl && bash setup_macos.sh && cd build && make -j3)
bash ./scripts/setup_osx_10.10.sh
(cd osx_x86_64_release && make -j3)
DIST_NAME=devsim_macos_${PLAT_NAME}_${1}
(cd dist && bash package_macos.sh ${DIST_NAME});
cp -f dist/bdist_wheel/setup.* dist/${DIST_NAME}
#echo PACKAGING $FULL_PLAT_NAME
#if [[ -n "$FULL_PLAT_NAME" ]]; then
#(cd dist/${DIST_NAME} && perl -p -i -e "s/^#plat-name.*/plat-name = ${FULL_PLAT_NAME}/" setup.cfg);
#fi
(cd dist/${DIST_NAME} && ${PIP_BIN} wheel .)
(cp dist/${DIST_NAME}/*.whl dist)