Skip to content

Commit

Permalink
target older macosx sdk (#11)
Browse files Browse the repository at this point in the history
* target older macosx sdk

* test macos on older mac

* check libssl/libcrypto with otool

* redirect libcrypto in libssl

* try even older macos

* Revert "try even older macos"

This reverts commit 692c305.
  • Loading branch information
bjia56 authored Jan 25, 2024
1 parent d00fb5d commit ec67a18
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ jobs:
test_macos:
name: MacOS ${{ inputs.python_version }} universal2 (test)
needs: build_macos
runs-on: macos-latest
runs-on: macos-11

steps:
- name: Download artifact
Expand Down
10 changes: 9 additions & 1 deletion scripts/build_macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ mkdir python-build
mkdir python-install
mkdir deps

export MACOSX_DEPLOYMENT_TARGET=10.15
export MACOSX_DEPLOYMENT_TARGET=10.5

git clone https://github.com/bjia56/python-cmake-buildsystem.git --branch python3.10 --single-branch --depth 1
#git clone https://github.com/bjia56/python-cmake-buildsystem.git --branch macos-arm64 --single-branch --depth 1
Expand All @@ -42,6 +42,11 @@ make install_sw
file ${WORKDIR}/deps/openssl/lib/libcrypto.a
file ${WORKDIR}/deps/openssl/lib/libssl.a

install_name_tool -change ${WORKDIR}/deps/openssl/lib/libcrypto.1.1.dylib @loader_path/libcrypto.1.1.dylib ${WORKDIR}/deps/openssl/lib/libssl.1.1.dylib

otool -l ${WORKDIR}/deps/openssl/lib/libssl.1.1.dylib
otool -l ${WORKDIR}/deps/openssl/lib/libcrypto.1.1.dylib

echo "::endgroup::"
#########
# bzip2 #
Expand All @@ -57,6 +62,7 @@ cd build
cmake \
-G "Unix Makefiles" \
"-DCMAKE_OSX_ARCHITECTURES=arm64;x86_64" \
-DCMAKE_OSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} \
-DCMAKE_INSTALL_PREFIX:PATH=${WORKDIR}/deps/bzip2 \
..
make -j${NPROC}
Expand All @@ -79,6 +85,7 @@ cd build
cmake \
-G "Unix Makefiles" \
"-DCMAKE_OSX_ARCHITECTURES=arm64;x86_64" \
-DCMAKE_OSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} \
-DCMAKE_INSTALL_PREFIX:PATH=${WORKDIR}/deps/xz \
..
make -j${NPROC}
Expand Down Expand Up @@ -119,6 +126,7 @@ cd build
cmake \
-G "Unix Makefiles" \
"-DCMAKE_OSX_ARCHITECTURES=arm64;x86_64" \
-DCMAKE_OSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} \
-DCMAKE_INSTALL_PREFIX:PATH=${WORKDIR}/deps/zlib \
..
make -j${NPROC}
Expand Down

0 comments on commit ec67a18

Please sign in to comment.