File tree Expand file tree Collapse file tree 2 files changed +28
-1
lines changed Expand file tree Collapse file tree 2 files changed +28
-1
lines changed Original file line number Diff line number Diff line change 22
22
23
23
mac-arm64 :
24
24
@echo " Make macOS arm64 whl"
25
- bash packages/build_mac_arm64.sh
25
+ packages/build_mac_arm64.sh
26
26
@echo " Done."
27
27
28
28
build : clean buildlib wheel
Original file line number Diff line number Diff line change 2
2
3
3
set -e
4
4
5
+ # check current arch
6
+ if [ " $( uname -m) " != " arm64" ]; then
7
+ echo " OS not supported, run with arch -arm64 /bin/bash"
8
+ exit 1
9
+ fi
10
+
5
11
DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " > /dev/null 2>&1 && pwd ) "
6
12
PROJ_DIR=$( dirname ${DIR} )
7
13
@@ -24,6 +30,27 @@ elif [ -f /usr/local/opt/llvm/bin/clang ]; then
24
30
export CC=/usr/local/opt/llvm/bin/clang
25
31
fi
26
32
33
+ # Download MacOSX11.0.sdk.tar.xz
34
+ if [ ! -f ${PROJ_DIR} /python_pkg/MacOSX11.0.sdk.tar.xz ]; then
35
+ wget " https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/MacOSX11.0.sdk.tar.xz" -O ${PROJ_DIR} /python_pkg/MacOSX11.0.sdk.tar.xz
36
+ fi
37
+
38
+ # Extract MacOSX11.0.sdk.tar.xz
39
+ if [ ! -f ${PROJ_DIR} /cmake/toolchain/darwin-x86_64/Entitlements.plist ]; then
40
+ tar xJf ${PROJ_DIR} /python_pkg/MacOSX11.0.sdk.tar.xz -C cmake/toolchain/darwin-x86_64 --strip-components=1
41
+ fi
42
+
43
+ # Fix soft link if darwin-aarch64 not linked to darwin-x86_64
44
+ if [ -L ${PROJ_DIR} /cmake/toolchain/darwin-aarch64 ]; then
45
+ dest=$( readlink ${PROJ_DIR} /cmake/toolchain/darwin-aarch64)
46
+ fi
47
+
48
+ if [ " ${dest} " != " darwin-x86_64" ]; then
49
+ rm -f ${PROJ_DIR} /cmake/toolchain/darwin-aarch64
50
+ ln -sf darwin-x86_64 ${PROJ_DIR} /cmake/toolchain/darwin-aarch64
51
+ fi
52
+
53
+
27
54
for PY_VER in 3.9.13 3.10.11 3.11.3; do
28
55
if [ ! -f ${PROJ_DIR} /python_pkg/python-${PY_VER} -macos11.pkg ]; then
29
56
wget https://www.python.org/ftp/python/${PY_VER} /python-${PY_VER} -macos11.pkg -O ${PROJ_DIR} /python_pkg/python-${PY_VER} -macos11.pkg
You can’t perform that action at this time.
0 commit comments