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 2222
2323mac-arm64 :
2424 @echo " Make macOS arm64 whl"
25- bash packages/build_mac_arm64.sh
25+ packages/build_mac_arm64.sh
2626 @echo " Done."
2727
2828build : clean buildlib wheel
Original file line number Diff line number Diff line change 22
33set -e
44
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+
511DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " > /dev/null 2>&1 && pwd ) "
612PROJ_DIR=$( dirname ${DIR} )
713
@@ -24,6 +30,27 @@ elif [ -f /usr/local/opt/llvm/bin/clang ]; then
2430 export CC=/usr/local/opt/llvm/bin/clang
2531fi
2632
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+
2754for PY_VER in 3.9.13 3.10.11 3.11.3; do
2855 if [ ! -f ${PROJ_DIR} /python_pkg/python-${PY_VER} -macos11.pkg ]; then
2956 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