Skip to content

Commit ae64a46

Browse files
Copilotletmaik
andauthored
Add Python 3.14 support and update CI infrastructure (#136)
Co-authored-by: letmaik <530988+letmaik@users.noreply.github.com>
1 parent a4c1de1 commit ae64a46

File tree

5 files changed

+78
-37
lines changed

5 files changed

+78
-37
lines changed

.github/scripts/build-linux.sh

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,12 @@ set -e -x
44
# List python versions
55
ls /opt/python
66

7-
if [ $PYTHON_VERSION == "3.8" ]; then
8-
PYBIN="/opt/python/cp38-cp38/bin"
9-
elif [ $PYTHON_VERSION == "3.9" ]; then
10-
PYBIN="/opt/python/cp39-cp39/bin"
11-
elif [ $PYTHON_VERSION == "3.10" ]; then
12-
PYBIN="/opt/python/cp310-cp310/bin"
13-
elif [ $PYTHON_VERSION == "3.11" ]; then
14-
PYBIN="/opt/python/cp311-cp311/bin"
15-
elif [ $PYTHON_VERSION == "3.12" ]; then
16-
PYBIN="/opt/python/cp312-cp312/bin"
17-
elif [ $PYTHON_VERSION == "3.13" ]; then
18-
PYBIN="/opt/python/cp313-cp313/bin"
19-
else
20-
echo "Unsupported Python version $PYTHON_VERSION"
7+
# Compute PYBIN from PYTHON_VERSION (e.g., "3.14" -> "cp314-cp314")
8+
PYVER_NO_DOT=${PYTHON_VERSION//./}
9+
PYBIN="/opt/python/cp${PYVER_NO_DOT}-cp${PYVER_NO_DOT}/bin"
10+
11+
if [ ! -d "$PYBIN" ]; then
12+
echo "Python version $PYTHON_VERSION not found at $PYBIN"
2113
exit 1
2214
fi
2315

@@ -26,6 +18,10 @@ if [ ! -z "$GITHUB_ENV" ]; then
2618
echo "PATH=$PYBIN:$PATH" >> $GITHUB_ENV
2719
fi
2820

21+
# Upgrade pip and prefer binary packages
22+
${PYBIN}/python -m pip install --upgrade pip
23+
export PIP_PREFER_BINARY=1
24+
2925
# install compile-time dependencies
3026
${PYBIN}/pip install numpy==${NUMPY_VERSION}
3127
${PYBIN}/pip install setuptools

.github/scripts/build-macos.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ source venv/bin/activate
2828
set -x
2929
popd
3030

31+
# Upgrade pip and prefer binary packages
32+
python -m pip install --upgrade pip
33+
export PIP_PREFER_BINARY=1
34+
3135
# Install dependencies
3236
pip install numpy==$NUMPY_VERSION wheel delocate setuptools
3337

.github/scripts/build-windows.ps1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ if (!$env:NUMPY_VERSION) {
7171

7272
Initialize-Python
7373

74+
# Prefer binary packages over building from source
75+
$env:PIP_PREFER_BINARY = 1
76+
7477
Get-ChildItem env:
7578

7679
# Build the wheel.

.github/scripts/test-linux.sh

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,12 @@ set -e -x
44
# List python versions
55
ls /opt/python
66

7-
if [ $PYTHON_VERSION == "3.8" ]; then
8-
PYBIN="/opt/python/cp38-cp38/bin"
9-
elif [ $PYTHON_VERSION == "3.9" ]; then
10-
PYBIN="/opt/python/cp39-cp39/bin"
11-
elif [ $PYTHON_VERSION == "3.10" ]; then
12-
PYBIN="/opt/python/cp310-cp310/bin"
13-
elif [ $PYTHON_VERSION == "3.11" ]; then
14-
PYBIN="/opt/python/cp311-cp311/bin"
15-
elif [ $PYTHON_VERSION == "3.12" ]; then
16-
PYBIN="/opt/python/cp312-cp312/bin"
17-
elif [ $PYTHON_VERSION == "3.13" ]; then
18-
PYBIN="/opt/python/cp313-cp313/bin"
19-
else
20-
echo "Unsupported Python version $PYTHON_VERSION"
7+
# Compute PYBIN from PYTHON_VERSION (e.g., "3.14" -> "cp314-cp314")
8+
PYVER_NO_DOT=${PYTHON_VERSION//./}
9+
PYBIN="/opt/python/cp${PYVER_NO_DOT}-cp${PYVER_NO_DOT}/bin"
10+
11+
if [ ! -d "$PYBIN" ]; then
12+
echo "Python version $PYTHON_VERSION not found at $PYBIN"
2113
exit 1
2214
fi
2315
PYVER=${PYTHON_VERSION//.}

.github/workflows/ci.yml

Lines changed: 55 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,12 @@ jobs:
6262
python-arch: 'x86_64'
6363
python-version: '3.13'
6464
numpy-version: '2.2.*'
65+
- os-image: ubuntu-latest
66+
os-name: linux
67+
docker-image: quay.io/pypa/manylinux2014_x86_64
68+
python-arch: 'x86_64'
69+
python-version: '3.14'
70+
numpy-version: '2.3.*'
6571

6672
- os-image: ubuntu-latest
6773
os-name: linux
@@ -93,62 +99,80 @@ jobs:
9399
python-arch: 'aarch64'
94100
python-version: '3.13'
95101
numpy-version: '2.2.*'
102+
- os-image: ubuntu-latest
103+
os-name: linux
104+
docker-image: quay.io/pypa/manylinux_2_28_aarch64
105+
python-arch: 'aarch64'
106+
python-version: '3.14'
107+
numpy-version: '2.3.*'
96108

97-
- os-image: macos-13
109+
- os-image: macos-15-intel
98110
os-name: mac
99111
python-arch: x86_64
100112
macos-min-version: '10.9'
101113
python-version: '3.9'
102114
numpy-version: '2.0.*'
103-
- os-image: macos-13
115+
- os-image: macos-15-intel
104116
os-name: mac
105117
python-arch: x86_64
106118
macos-min-version: '10.9'
107119
python-version: '3.10'
108120
numpy-version: '2.0.*'
109-
- os-image: macos-13
121+
- os-image: macos-15-intel
110122
os-name: mac
111123
python-arch: x86_64
112124
macos-min-version: '10.9'
113125
python-version: '3.11'
114126
numpy-version: '2.0.*'
115-
- os-image: macos-13
127+
- os-image: macos-15-intel
116128
os-name: mac
117129
python-arch: x86_64
118130
macos-min-version: '10.9'
119131
python-version: '3.12'
120132
numpy-version: '2.0.*'
121-
- os-image: macos-13
133+
- os-image: macos-15-intel
122134
os-name: mac
123135
python-arch: x86_64
124136
macos-min-version: '10.9'
125137
python-version: '3.13'
126138
numpy-version: '2.2.*'
139+
- os-image: macos-15-intel
140+
os-name: mac
141+
python-arch: x86_64
142+
macos-min-version: '10.9'
143+
python-version: '3.14'
144+
numpy-version: '2.3.*'
127145

128-
- os-image: macos-14 # M1
146+
- os-image: macos-15
129147
os-name: mac
130148
python-arch: arm64
131149
macos-min-version: '11.0'
132150
python-version: '3.10'
133151
numpy-version: '2.0.*'
134-
- os-image: macos-14 # M1
152+
- os-image: macos-15
135153
os-name: mac
136154
python-arch: arm64
137155
macos-min-version: '11.0'
138156
python-version: '3.11'
139157
numpy-version: '2.0.*'
140-
- os-image: macos-14 # M1
158+
- os-image: macos-15
141159
os-name: mac
142160
python-arch: arm64
143161
macos-min-version: '11.0'
144162
python-version: '3.12'
145163
numpy-version: '2.0.*'
146-
- os-image: macos-14 # M1
164+
- os-image: macos-15
147165
os-name: mac
148166
python-arch: arm64
149167
macos-min-version: '11.0'
150168
python-version: '3.13'
151169
numpy-version: '2.2.*'
170+
- os-image: macos-15
171+
os-name: mac
172+
python-arch: arm64
173+
macos-min-version: '11.0'
174+
python-version: '3.14'
175+
numpy-version: '2.3.*'
152176

153177
- os-image: windows-latest
154178
os-name: windows
@@ -175,6 +199,11 @@ jobs:
175199
python-version: '3.13'
176200
python-arch: 'x86_64'
177201
numpy-version: '2.2.*'
202+
- os-image: windows-latest
203+
os-name: windows
204+
python-version: '3.14'
205+
python-arch: 'x86_64'
206+
numpy-version: '2.3.*'
178207

179208
permissions:
180209
security-events: write
@@ -282,6 +311,12 @@ jobs:
282311
python-arch: 'x86_64'
283312
python-version: '3.13'
284313
numpy-version: '2.2.*'
314+
- os-image: ubuntu-latest
315+
os-name: linux
316+
docker-image: quay.io/pypa/manylinux2014_x86_64
317+
python-arch: 'x86_64'
318+
python-version: '3.14'
319+
numpy-version: '2.3.*'
285320

286321
- os-image: ubuntu-latest
287322
os-name: linux
@@ -313,6 +348,12 @@ jobs:
313348
python-arch: 'aarch64'
314349
python-version: '3.13'
315350
numpy-version: '2.2.*'
351+
- os-image: ubuntu-latest
352+
os-name: linux
353+
docker-image: quay.io/pypa/manylinux_2_28_aarch64
354+
python-arch: 'aarch64'
355+
python-version: '3.14'
356+
numpy-version: '2.3.*'
316357

317358
- os-image: windows-latest
318359
os-name: windows
@@ -339,6 +380,11 @@ jobs:
339380
python-version: '3.13'
340381
python-arch: 'x86_64'
341382
numpy-version: '2.2.*'
383+
- os-image: windows-latest
384+
os-name: windows
385+
python-version: '3.14'
386+
python-arch: 'x86_64'
387+
numpy-version: '2.3.*'
342388

343389
runs-on: ${{ matrix.config.os-image }}
344390
# container: ${{ matrix.config.docker-image }}

0 commit comments

Comments
 (0)