Skip to content

Commit 69b8dbc

Browse files
committed
Add Python 3.15 wheels to the release workflow
Keep Python 3.8 on cibuildwheel 3.2 and use 4.2 for newer versions. Pair runners with architectures explicitly and test universal2 wheels on arm64. Prepare OpenSSL and Linux container dependencies for wheel tests, and pass the GitHub CI marker into Linux containers.
1 parent 287f17a commit 69b8dbc

2 files changed

Lines changed: 34 additions & 13 deletions

File tree

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
# cryptography has no CPython 3.15t wheels yet. These dependencies are only
5+
# needed to build test dependencies inside the cibuildwheel container.
6+
if command -v apk >/dev/null 2>&1; then
7+
apk add --no-cache openssl-dev libffi-dev pkgconf
8+
else
9+
# manylinux_2_28 ships OpenSSL 1.1.1; cryptography needs OpenSSL 3.
10+
yum install -y openssl3-devel libffi-devel pkgconfig
11+
# EPEL names its pkg-config file openssl3.pc; the build looks for openssl.
12+
mkdir -p /usr/local/lib/pkgconfig
13+
ln -s /usr/lib64/pkgconfig/openssl3.pc /usr/local/lib/pkgconfig/openssl.pc
14+
fi

‎.github/workflows/release.yml‎

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,11 @@ jobs:
7575
strategy:
7676
fail-fast: false
7777
matrix:
78-
# Test x86_64 wheels with native OpenSSL for cryptography builds.
79-
os: [ubuntu-latest, macos-15-intel, ubuntu-22.04-arm]
78+
os:
79+
- ubuntu-latest
80+
- ubuntu-22.04-arm
81+
- macos-15-intel
82+
- macos-latest
8083
python:
8184
- "cp38"
8285
- "cp39"
@@ -88,17 +91,15 @@ jobs:
8891
- "cp314t"
8992
- "cp315"
9093
- "cp315t"
91-
cibw_arch: ["x86_64", "aarch64", "universal2"]
92-
exclude:
93-
- os: ubuntu-latest
94-
cibw_arch: universal2
94+
include:
9595
- os: ubuntu-latest
96+
cibw_arch: x86_64
97+
- os: ubuntu-22.04-arm
9698
cibw_arch: aarch64
99+
# Use native OpenSSL when compiling x86_64 test dependencies.
97100
- os: macos-15-intel
98-
cibw_arch: aarch64
99-
- os: ubuntu-22.04-arm
100101
cibw_arch: x86_64
101-
- os: ubuntu-22.04-arm
102+
- os: macos-latest
102103
cibw_arch: universal2
103104

104105
defaults:
@@ -110,7 +111,10 @@ jobs:
110111
CIBW_BUILD_VERBOSITY: 1
111112
CIBW_BUILD: ${{ matrix.python }}-*
112113
CIBW_ARCHS: ${{ matrix.cibw_arch }}
113-
CIBW_TEST_SKIP: "*universal2:arm64"
114+
# Let tests inside Linux containers recognize GitHub CI.
115+
CIBW_ENVIRONMENT_PASS_LINUX: GITHUB_WORKFLOW
116+
# Exercise arm64 here; x86_64 wheels have their own test jobs.
117+
CIBW_TEST_SKIP: "*universal2:x86_64"
114118

115119
steps:
116120
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
@@ -131,10 +135,13 @@ jobs:
131135
- uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0
132136
if: matrix.python != 'cp38'
133137
env:
134-
# Test dependencies need only the native slice, even for universal2.
138+
CIBW_BEFORE_ALL_LINUX: >-
139+
${{ matrix.python == 'cp315t' && 'bash {project}/.github/workflows/install-linux-test-deps.sh' || '' }}
140+
# Build universal2 wheels, but compile their test dependencies for arm64.
135141
CIBW_TEST_ENVIRONMENT_MACOS: >-
136-
ARCHFLAGS="-arch x86_64"
137-
_PYTHON_HOST_PLATFORM="macosx-15.0-x86_64"
142+
${{ matrix.cibw_arch == 'universal2'
143+
&& 'ARCHFLAGS="-arch arm64" _PYTHON_HOST_PLATFORM="macosx-11.0-arm64"'
144+
|| '' }}
138145
139146
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
140147
with:

0 commit comments

Comments
 (0)