Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
juliannguyen4 committed Dec 9, 2024
1 parent d3495bd commit 6b863db
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: >
Expand Down

0 comments on commit 6b863db

Please sign in to comment.