From 6f3937469974ef6af97458b8b6c6cd8dea9f09ad Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Fri, 6 Dec 2024 09:51:13 -0800 Subject: [PATCH 01/21] Rm and see what happens --- setup.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/setup.py b/setup.py index 78513f45d..0669471c8 100644 --- a/setup.py +++ b/setup.py @@ -47,8 +47,6 @@ WINDOWS = 'Windows' in PLATFORM CWD = os.path.abspath(os.path.dirname(__file__)) -STATIC_SSL = os.getenv('STATIC_SSL') -SSL_LIB_PATH = os.getenv('SSL_LIB_PATH') # COVERAGE environment variable only meant for CI/CD workflow to generate C coverage data # Not for developers to use, unless you know what the workflow is doing! COVERAGE = os.getenv('COVERAGE') @@ -121,13 +119,6 @@ # STATIC SSL LINKING BUILD SETTINGS ################################################################################ -if STATIC_SSL: - extra_objects.extend( - [SSL_LIB_PATH + 'libssl.a', SSL_LIB_PATH + 'libcrypto.a']) - libraries.remove('ssl') - libraries.remove('crypto') - library_dirs.remove('/usr/local/opt/openssl/lib') - ################################################################################ # PLATFORM SPECIFIC BUILD SETTINGS ################################################################################ @@ -181,9 +172,6 @@ # Needed for linking the Python client with the C client extra_objects.append(AEROSPIKE_C_TARGET + "/vs/x64/Release/aerospike.lib") -os.putenv('CPATH', ':'.join(include_dirs)) -os.environ['CPATH'] = ':'.join(include_dirs) - ################################################################################ # SETUP ################################################################################ From acf51cb55e908140ad2d43efa803ad2170d03e5d Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Fri, 6 Dec 2024 09:59:55 -0800 Subject: [PATCH 02/21] try --- .github/workflows/build-wheels.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index 37f8b7ae0..5410b126e 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -245,6 +245,9 @@ jobs: - if: ${{ startsWith(inputs.platform-tag, 'manylinux') }} run: echo CIBW_MANYLINUX_AARCH64_IMAGE=${{ format(env.CUSTOM_IMAGE_NAME, 'aarch64') }} >> $GITHUB_ENV + - if: ${{ startsWith(inputs.platform-tag, 'macosx') }} + run: echo MACOSX_DEPLOYMENT_TARGET=12.0 >> $GITHUB_ENV + - uses: docker/login-action@v3 if: ${{ startsWith(inputs.platform-tag, 'manylinux') }} with: From 6ed5b9f5f95a77f437d9b40a6926ba59757c923a Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Fri, 6 Dec 2024 10:06:35 -0800 Subject: [PATCH 03/21] Shouldnt openssl be installed in the default search path, usually? --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 0669471c8..cb0d33a5f 100644 --- a/setup.py +++ b/setup.py @@ -94,7 +94,7 @@ extra_link_args.append("-static-libasan") extra_link_args.extend(sanitizer_flags) -library_dirs = ['/usr/local/opt/openssl/lib', '/usr/local/lib'] +library_dirs = ['/usr/local/lib'] libraries = [ 'ssl', 'crypto', From 211801790ab3638a60c2c64662d68886fd9871df Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Fri, 6 Dec 2024 10:09:03 -0800 Subject: [PATCH 04/21] rm useless env var --- .github/workflows/build-wheels.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index 5410b126e..074a8344a 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -259,7 +259,6 @@ jobs: uses: pypa/cibuildwheel@v2.21.3 env: CIBW_ENVIRONMENT_PASS_LINUX: ${{ inputs.unoptimized && 'UNOPTIMIZED' || '' }} - CIBW_ENVIRONMENT_MACOS: SSL_LIB_PATH="$(brew --prefix openssl@${{ env.MACOS_OPENSSL_VERSION }})/lib/" CPATH="$(brew --prefix openssl@${{ env.MACOS_OPENSSL_VERSION }})/include/" STATIC_SSL=1 CIBW_BUILD: ${{ env.BUILD_IDENTIFIER }} CIBW_BUILD_FRONTEND: build CIBW_BEFORE_ALL_LINUX: > From 60a93ec0aaf6801042cc7b1557e7ee47e478df08 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Fri, 6 Dec 2024 10:19:11 -0800 Subject: [PATCH 05/21] Install openssl 3 to be safe --- .github/workflows/build-wheels.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index 074a8344a..346420c21 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -255,6 +255,12 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + # It is not documented in Github that openssl 3 is installed in their macos images + # so we install it here to be safe + - if: ${{ startsWith(inputs.platform-tag, 'macosx') }} + name: Ensure openssl 3 is installed on Github macOS runners. + run: brew install openssl@3 + - name: Build wheel uses: pypa/cibuildwheel@v2.21.3 env: From 3dd2754b85176633772e048ce6c724abcb59caf5 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Fri, 6 Dec 2024 14:55:50 -0800 Subject: [PATCH 06/21] just fix in workflow --- .github/workflows/build-wheels.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index 346420c21..a1ce1867f 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -333,7 +333,8 @@ jobs: ref: ${{ env.COMMIT_SHA_TO_BUILD_AND_TEST }} # Need to be able to save Docker Hub credentials to keychain - - if: ${{ inputs.platform-tag == 'macosx_arm64' && inputs.use-server-rc }} + # Unable to do this via the ansible script for self hosted mac m1 runners + - if: ${{ inputs.platform-tag == 'macosx_arm64' }} run: security unlock-keychain -p ${{ secrets.MAC_M1_SELF_HOSTED_RUNNER_PW }} - uses: ./.github/actions/run-ee-server From eddcc522ec4b529dbf416248577fa16cab8813fe Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Mon, 9 Dec 2024 10:21:07 -0800 Subject: [PATCH 07/21] label wheel with the macos version it is built from --- .github/workflows/build-wheels.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index a1ce1867f..8529cc877 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -245,8 +245,9 @@ jobs: - if: ${{ startsWith(inputs.platform-tag, 'manylinux') }} run: echo CIBW_MANYLINUX_AARCH64_IMAGE=${{ format(env.CUSTOM_IMAGE_NAME, 'aarch64') }} >> $GITHUB_ENV - - if: ${{ startsWith(inputs.platform-tag, 'macosx') }} - run: echo MACOSX_DEPLOYMENT_TARGET=12.0 >> $GITHUB_ENV + - name: The macOS wheel is only backwards compatible with the macOS version it is built from + if: ${{ startsWith(inputs.platform-tag, 'macosx') }} + run: echo MACOSX_DEPLOYMENT_TARGET=$(sw_vers --productVersion | cut -d"." -f -2) >> $GITHUB_ENV - uses: docker/login-action@v3 if: ${{ startsWith(inputs.platform-tag, 'manylinux') }} From 41147b6ca2d5d22c8dd5bbfca8df24298509b0e8 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Mon, 9 Dec 2024 10:32:03 -0800 Subject: [PATCH 08/21] set deployment target to major version. openssl library is compatible with all minor versions under major version --- .github/workflows/build-wheels.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index 8529cc877..6bb5b35e2 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -245,9 +245,9 @@ jobs: - if: ${{ startsWith(inputs.platform-tag, 'manylinux') }} run: echo CIBW_MANYLINUX_AARCH64_IMAGE=${{ format(env.CUSTOM_IMAGE_NAME, 'aarch64') }} >> $GITHUB_ENV - - name: The macOS wheel is only backwards compatible with the macOS version it is built from + - name: The macOS wheel is only backwards compatible with the macOS major version it is built from if: ${{ startsWith(inputs.platform-tag, 'macosx') }} - run: echo MACOSX_DEPLOYMENT_TARGET=$(sw_vers --productVersion | cut -d"." -f -2) >> $GITHUB_ENV + run: echo MACOSX_DEPLOYMENT_TARGET=$(sw_vers --productVersion | cut -d"." -f 1).0 >> $GITHUB_ENV - uses: docker/login-action@v3 if: ${{ startsWith(inputs.platform-tag, 'manylinux') }} From f1ab80cfecb5820a798c0192faa8999df25b8c74 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Mon, 9 Dec 2024 10:35:35 -0800 Subject: [PATCH 09/21] Fix --- .github/workflows/build-wheels.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index 6bb5b35e2..8c3bee735 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -247,7 +247,8 @@ jobs: - name: The macOS wheel is only backwards compatible with the macOS major version it is built from if: ${{ startsWith(inputs.platform-tag, 'macosx') }} - run: echo MACOSX_DEPLOYMENT_TARGET=$(sw_vers --productVersion | cut -d"." -f 1).0 >> $GITHUB_ENV + # Use single dash for backwards compatibility + run: echo MACOSX_DEPLOYMENT_TARGET=$(sw_vers -productVersion | cut -d"." -f 1).0 >> $GITHUB_ENV - uses: docker/login-action@v3 if: ${{ startsWith(inputs.platform-tag, 'manylinux') }} From 2bab5560e8f9b4084f43c0a7b1ba2fb609277192 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Mon, 9 Dec 2024 10:55:58 -0800 Subject: [PATCH 10/21] Revert "Rm and see what happens" This reverts commit 6f3937469974ef6af97458b8b6c6cd8dea9f09ad. --- setup.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/setup.py b/setup.py index cb0d33a5f..bd639846b 100644 --- a/setup.py +++ b/setup.py @@ -47,6 +47,8 @@ WINDOWS = 'Windows' in PLATFORM CWD = os.path.abspath(os.path.dirname(__file__)) +STATIC_SSL = os.getenv('STATIC_SSL') +SSL_LIB_PATH = os.getenv('SSL_LIB_PATH') # COVERAGE environment variable only meant for CI/CD workflow to generate C coverage data # Not for developers to use, unless you know what the workflow is doing! COVERAGE = os.getenv('COVERAGE') @@ -119,6 +121,13 @@ # STATIC SSL LINKING BUILD SETTINGS ################################################################################ +if STATIC_SSL: + extra_objects.extend( + [SSL_LIB_PATH + 'libssl.a', SSL_LIB_PATH + 'libcrypto.a']) + libraries.remove('ssl') + libraries.remove('crypto') + library_dirs.remove('/usr/local/opt/openssl/lib') + ################################################################################ # PLATFORM SPECIFIC BUILD SETTINGS ################################################################################ @@ -172,6 +181,9 @@ # Needed for linking the Python client with the C client extra_objects.append(AEROSPIKE_C_TARGET + "/vs/x64/Release/aerospike.lib") +os.putenv('CPATH', ':'.join(include_dirs)) +os.environ['CPATH'] = ':'.join(include_dirs) + ################################################################################ # SETUP ################################################################################ From 00f5bda42b78cfbf1df7572e06523a902d26e884 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Mon, 9 Dec 2024 10:56:16 -0800 Subject: [PATCH 11/21] Revert "rm useless env var" This reverts commit 211801790ab3638a60c2c64662d68886fd9871df. --- .github/workflows/build-wheels.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index 8c3bee735..b1768a67c 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -267,6 +267,7 @@ jobs: uses: pypa/cibuildwheel@v2.21.3 env: CIBW_ENVIRONMENT_PASS_LINUX: ${{ inputs.unoptimized && 'UNOPTIMIZED' || '' }} + CIBW_ENVIRONMENT_MACOS: SSL_LIB_PATH="$(brew --prefix openssl@${{ env.MACOS_OPENSSL_VERSION }})/lib/" CPATH="$(brew --prefix openssl@${{ env.MACOS_OPENSSL_VERSION }})/include/" STATIC_SSL=1 CIBW_BUILD: ${{ env.BUILD_IDENTIFIER }} CIBW_BUILD_FRONTEND: build CIBW_BEFORE_ALL_LINUX: > From d33ecb8993b41091840493315326db7062bae74e Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Mon, 9 Dec 2024 10:58:58 -0800 Subject: [PATCH 12/21] only need env var for cibw --- .github/workflows/build-wheels.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index b1768a67c..efa56f4bd 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -245,11 +245,6 @@ jobs: - if: ${{ startsWith(inputs.platform-tag, 'manylinux') }} run: echo CIBW_MANYLINUX_AARCH64_IMAGE=${{ format(env.CUSTOM_IMAGE_NAME, 'aarch64') }} >> $GITHUB_ENV - - name: The macOS wheel is only backwards compatible with the macOS major version it is built from - if: ${{ startsWith(inputs.platform-tag, 'macosx') }} - # Use single dash for backwards compatibility - run: echo MACOSX_DEPLOYMENT_TARGET=$(sw_vers -productVersion | cut -d"." -f 1).0 >> $GITHUB_ENV - - uses: docker/login-action@v3 if: ${{ startsWith(inputs.platform-tag, 'manylinux') }} with: @@ -267,7 +262,9 @@ jobs: uses: pypa/cibuildwheel@v2.21.3 env: CIBW_ENVIRONMENT_PASS_LINUX: ${{ inputs.unoptimized && 'UNOPTIMIZED' || '' }} - CIBW_ENVIRONMENT_MACOS: SSL_LIB_PATH="$(brew --prefix openssl@${{ env.MACOS_OPENSSL_VERSION }})/lib/" CPATH="$(brew --prefix openssl@${{ env.MACOS_OPENSSL_VERSION }})/include/" STATIC_SSL=1 + # macOS wheel is only backwards compatible with the macOS major version it is built from + # Use single dash for backwards compatibility with older sw_vers + CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET=$(sw_vers -productVersion | cut -d"." -f 1).0 CIBW_BUILD: ${{ env.BUILD_IDENTIFIER }} CIBW_BUILD_FRONTEND: build CIBW_BEFORE_ALL_LINUX: > From a7056f83264f4f4918342fbaf67fd66e32dcc76e Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Mon, 9 Dec 2024 11:02:19 -0800 Subject: [PATCH 13/21] explain --- .github/workflows/build-wheels.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index efa56f4bd..f7bdc312b 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -262,6 +262,9 @@ jobs: uses: pypa/cibuildwheel@v2.21.3 env: CIBW_ENVIRONMENT_PASS_LINUX: ${{ inputs.unoptimized && 'UNOPTIMIZED' || '' }} + # We use delocate to repair the wheel because it verifies that the macOS version tag in the wheel name is correct + # Linking the static libraries produces a warning that the library version is newer than the wheel's macOS version tag + # but it doesn't throw an error. # macOS wheel is only backwards compatible with the macOS major version it is built from # Use single dash for backwards compatibility with older sw_vers CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET=$(sw_vers -productVersion | cut -d"." -f 1).0 From 385c25e7c08a26cffa0442de8cd8dd7626773831 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Mon, 9 Dec 2024 11:04:20 -0800 Subject: [PATCH 14/21] clean --- .github/workflows/build-wheels.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index f7bdc312b..6f32b8676 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -262,9 +262,9 @@ jobs: uses: pypa/cibuildwheel@v2.21.3 env: CIBW_ENVIRONMENT_PASS_LINUX: ${{ inputs.unoptimized && 'UNOPTIMIZED' || '' }} - # We use delocate to repair the wheel because it verifies that the macOS version tag in the wheel name is correct - # Linking the static libraries produces a warning that the library version is newer than the wheel's macOS version tag - # but it doesn't throw an error. + # We use delocate to repair the wheel because it throws an error if + # the openssl library version is newer than the wheel's macOS version tag + # Linking the static libraries produces a warning for that same reason that but it doesn't throw an error. # macOS wheel is only backwards compatible with the macOS major version it is built from # Use single dash for backwards compatibility with older sw_vers CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET=$(sw_vers -productVersion | cut -d"." -f 1).0 From d3495bdb02e08068c9c30bf5ee951dfdf6b5b1ae Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Mon, 9 Dec 2024 11:20:57 -0800 Subject: [PATCH 15/21] Fix mac arm64 --- .github/workflows/build-wheels.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index 6f32b8676..231289bf1 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -255,19 +255,25 @@ jobs: # It is not documented in Github that openssl 3 is installed in their macos images # so we install it here to be safe - if: ${{ startsWith(inputs.platform-tag, 'macosx') }} - name: Ensure openssl 3 is installed on Github macOS runners. - run: brew install openssl@3 + name: Ensure openssl is installed on Github macOS runners. + run: brew install openssl@${{ env.MACOS_OPENSSL_VERSION }} + + - if: ${{ inputs.platform-tag == 'macosx_arm64' }} + name: Ensure that linker can find openssl + run: echo LIBRARY_PATH=$(brew --prefix openssl@${{ env.MACOS_OPENSSL_VERSION }}):$LIBRARY_PATH >> $GITHUB_ENV - name: Build wheel uses: pypa/cibuildwheel@v2.21.3 env: CIBW_ENVIRONMENT_PASS_LINUX: ${{ inputs.unoptimized && 'UNOPTIMIZED' || '' }} - # We use delocate to repair the wheel because it throws an error if + # - We use delocate to repair the wheel because it throws an error if # the openssl library version is newer than the wheel's macOS version tag # Linking the static libraries produces a warning for that same reason that but it doesn't throw an error. # macOS wheel is only backwards compatible with the macOS major version it is built from - # Use single dash for backwards compatibility with older sw_vers - CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET=$(sw_vers -productVersion | cut -d"." -f 1).0 + # - Use single dash for backwards compatibility with older sw_vers + # - on mac m1, openssl@3 installed via brew is not in the linker's default library path + CIBW_ENVIRONMENT_MACOS: > + MACOSX_DEPLOYMENT_TARGET=$(sw_vers -productVersion | cut -d"." -f 1).0 CIBW_BUILD: ${{ env.BUILD_IDENTIFIER }} CIBW_BUILD_FRONTEND: build CIBW_BEFORE_ALL_LINUX: > From 6b863dba759c10a009cd1d8cd571a3058ac6cab1 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Mon, 9 Dec 2024 11:25:11 -0800 Subject: [PATCH 16/21] fix --- .github/workflows/build-wheels.yml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index 231289bf1..0630e0423 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -258,22 +258,24 @@ jobs: name: Ensure openssl is installed on Github macOS runners. run: brew install openssl@${{ env.MACOS_OPENSSL_VERSION }} + - if: ${{ startsWith(inputs.platform-tag, 'macosx') }} + name: Ensure openssl is installed on Github macOS runners. + # - We use delocate to repair the wheel because it throws an error if + # the openssl library version is newer than the wheel's macOS version tag + # Linking the static libraries produces a warning for that same reason that but it doesn't throw an error. + # macOS wheel is only backwards compatible with the macOS major version it is built from + # - Use single dash for backwards compatibility with older sw_vers + run: echo MACOSX_DEPLOYMENT_TARGET=$(sw_vers -productVersion | cut -d"." -f 1).0 >> $GITHUB_ENV + - if: ${{ inputs.platform-tag == 'macosx_arm64' }} name: Ensure that linker can find openssl + # On mac m1, openssl@3 installed via brew is not in the linker's default library path run: echo LIBRARY_PATH=$(brew --prefix openssl@${{ env.MACOS_OPENSSL_VERSION }}):$LIBRARY_PATH >> $GITHUB_ENV - name: Build wheel uses: pypa/cibuildwheel@v2.21.3 env: CIBW_ENVIRONMENT_PASS_LINUX: ${{ inputs.unoptimized && 'UNOPTIMIZED' || '' }} - # - We use delocate to repair the wheel because it throws an error if - # the openssl library version is newer than the wheel's macOS version tag - # Linking the static libraries produces a warning for that same reason that but it doesn't throw an error. - # macOS wheel is only backwards compatible with the macOS major version it is built from - # - Use single dash for backwards compatibility with older sw_vers - # - on mac m1, openssl@3 installed via brew is not in the linker's default library path - CIBW_ENVIRONMENT_MACOS: > - MACOSX_DEPLOYMENT_TARGET=$(sw_vers -productVersion | cut -d"." -f 1).0 CIBW_BUILD: ${{ env.BUILD_IDENTIFIER }} CIBW_BUILD_FRONTEND: build CIBW_BEFORE_ALL_LINUX: > From 58470cc5fa4a1e9d290877e6fb6c4ac3bb5684d3 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Mon, 9 Dec 2024 11:26:30 -0800 Subject: [PATCH 17/21] fix --- .github/workflows/build-wheels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index 0630e0423..8f6ab0c2e 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -259,7 +259,7 @@ jobs: run: brew install openssl@${{ env.MACOS_OPENSSL_VERSION }} - if: ${{ startsWith(inputs.platform-tag, 'macosx') }} - name: Ensure openssl is installed on Github macOS runners. + name: Set minimum macos version required to install wheel # - We use delocate to repair the wheel because it throws an error if # the openssl library version is newer than the wheel's macOS version tag # Linking the static libraries produces a warning for that same reason that but it doesn't throw an error. From ff292d3e161d0ea9d2ded0a545ded93210abecad Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Mon, 9 Dec 2024 11:28:07 -0800 Subject: [PATCH 18/21] try --- .github/workflows/build-wheels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index 8f6ab0c2e..1ed7ecba6 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -270,7 +270,7 @@ jobs: - if: ${{ inputs.platform-tag == 'macosx_arm64' }} name: Ensure that linker can find openssl # On mac m1, openssl@3 installed via brew is not in the linker's default library path - run: echo LIBRARY_PATH=$(brew --prefix openssl@${{ env.MACOS_OPENSSL_VERSION }}):$LIBRARY_PATH >> $GITHUB_ENV + run: echo CFLAGS="-L$(brew --prefix openssl@${{ env.MACOS_OPENSSL_VERSION }}) $CFLAGS" >> $GITHUB_ENV - name: Build wheel uses: pypa/cibuildwheel@v2.21.3 From 3bfd0721379e8e651d68d7b578fe3086c2eb8fff Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Mon, 9 Dec 2024 11:30:02 -0800 Subject: [PATCH 19/21] Fix --- .github/workflows/build-wheels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index 1ed7ecba6..4f814aa5b 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -270,7 +270,7 @@ jobs: - if: ${{ inputs.platform-tag == 'macosx_arm64' }} name: Ensure that linker can find openssl # On mac m1, openssl@3 installed via brew is not in the linker's default library path - run: echo CFLAGS="-L$(brew --prefix openssl@${{ env.MACOS_OPENSSL_VERSION }}) $CFLAGS" >> $GITHUB_ENV + run: echo CFLAGS="-L$(brew --prefix openssl@${{ env.MACOS_OPENSSL_VERSION }})/lib $CFLAGS" >> $GITHUB_ENV - name: Build wheel uses: pypa/cibuildwheel@v2.21.3 From 4f3368ffbfda1d6afdc0a4a2dbc75a5e2ebb9fff Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Mon, 9 Dec 2024 11:37:14 -0800 Subject: [PATCH 20/21] add verify step on macos --- .github/workflows/build-wheels.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index 4f814aa5b..d9ca8c992 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -294,6 +294,10 @@ jobs: auditwheel show {dest_dir}/* && rm -rf $WHEEL_DIR CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "delvewheel repair --add-path ./aerospike-client-c/vs/x64/Release -w {dest_dir} {wheel}" + # We also want to verify the same thing on macos + CIBW_REPAIR_WHEEL_COMMAND_MACOS: > + delocate-listdeps {wheel} && + delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel} && CIBW_TEST_COMMAND: ${{ env.TEST_COMMAND }} # For debugging From 1f9a170b7f15c8a92da09bcbd4a00f2965f08d10 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Mon, 9 Dec 2024 11:43:12 -0800 Subject: [PATCH 21/21] Fix --- .github/workflows/build-wheels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index d9ca8c992..cfb5009a2 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -297,7 +297,7 @@ jobs: # We also want to verify the same thing on macos CIBW_REPAIR_WHEEL_COMMAND_MACOS: > delocate-listdeps {wheel} && - delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel} && + delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel} CIBW_TEST_COMMAND: ${{ env.TEST_COMMAND }} # For debugging