Skip to content

Commit 7368fcf

Browse files
authored
Fix issues with macOS wheels. (#278)
macOS wheels were being linked without OpenSSL due because the build script was not able to correctly detect that the library was installed. This only happens when running inside the cibuildwheel container, even though OpenSSL is actually installed. The OpenSSL detection is bypassed by using --enable-openssl.
1 parent 7b6a7f9 commit 7368fcf

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

.github/workflows/publish-to-pypi.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@ jobs:
2626
- os: ubuntu-24.04
2727
arch: aarch64
2828
- os: macos-15
29-
arch: x86_64 universal2
29+
arch: x86_64 arm64
30+
env: MACOSX_DEPLOYMENT_TARGET=15.0
31+
- os: macos-14
32+
arch: x86_64 arm64
33+
env: MACOSX_DEPLOYMENT_TARGET=14.0
3034
- os: windows-2022
3135
arch: x86
3236
before: vcpkg install openssl:x86-windows-static
@@ -67,9 +71,9 @@ jobs:
6771
apk add openssl-dev
6872
fi
6973
CIBW_BEFORE_ALL_WINDOWS: ${{ matrix.before }}
70-
CIBW_BUILD_FRONTEND: build
74+
CIBW_BUILD_FRONTEND: "build; args: --config-setting=--enable-openssl"
7175
CIBW_ENVIRONMENT: ${{ matrix.env }}
72-
CIBW_TEST_SKIP: "*-macosx_universal2:arm64"
76+
CIBW_TEST_SKIP: "*-macosx_arm64 *-macosx_x86_64"
7377
CIBW_TEST_COMMAND: python {package}/tests.py
7478

7579
- name: Store the distribution packages

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ def finalize_options(self):
178178
'--enable-macho can''t be used with --dynamic-linking')
179179
if self.enable_openssl and self.dynamic_linking:
180180
raise distutils.errors.DistutilsOptionError(
181-
'--enable-enable-openssl can''t be used with --dynamic-linking')
181+
'--enable-openssl can''t be used with --dynamic-linking')
182182

183183

184184
def run(self):

0 commit comments

Comments
 (0)