Skip to content

Commit 6b4a665

Browse files
authored
Review supported Python versions and platforms (#130)
1 parent 70b4c9e commit 6b4a665

8 files changed

Lines changed: 52 additions & 71 deletions

File tree

.github/workflows/cibuildwheel.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,12 @@ jobs:
1313
runs-on: ${{ matrix.os }}
1414
strategy:
1515
matrix:
16-
# macos-15-intel is an intel runner, macos-latest is apple silicon
17-
os: [ubuntu-latest, macos-15-intel, macos-latest, ubuntu-24.04-arm, windows-latest]
16+
os:
17+
- ubuntu-latest # x64
18+
- ubuntu-24.04-arm # ARM
19+
- macos-15-intel # x64
20+
- macos-latest # ARM
21+
- windows-latest # x64
1822

1923
steps:
2024
# See https://cibuildwheel.pypa.io/en/1.x/cpp_standards/

.github/workflows/tests.yml

Lines changed: 25 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,24 @@ jobs:
2222
strategy:
2323
fail-fast: true
2424
matrix:
25-
os: [ubuntu-latest, windows-2022]
26-
python_version: ["3.9", "3.10", "3.11", "3.12"]
25+
os:
26+
- ubuntu-latest # x64
27+
- ubuntu-24.04-arm # ARM
28+
- macos-15-intel # x64
29+
- macos-latest # ARM
30+
- windows-latest # x64
31+
python_version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
32+
cc: [''] # default: gcc on Linux; clang on Mac/Windows
33+
include:
34+
# Note: default compiler for Linux is gcc. cibuildwheel uses gcc.
35+
# FIXME: clang crashes on ARM Linux
36+
- os: ubuntu-latest
37+
python_version: "3.10"
38+
cc: clang
39+
- os: ubuntu-latest
40+
python_version: "3.14"
41+
cc: clang
42+
2743
runs-on: ${{ matrix.os }}
2844

2945
steps:
@@ -34,7 +50,6 @@ jobs:
3450
uses: actions/setup-python@v6
3551
with:
3652
python-version: ${{ matrix.python_version }}
37-
architecture: x64
3853

3954
# Install LLVM 18 on Windows
4055
- name: Install LLVM 18 on Windows
@@ -52,18 +67,6 @@ jobs:
5267
run: |
5368
dir "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build" /b
5469
55-
set "PATH=C:\\Program Files\\LLVM\\bin;%PATH%"
56-
set "AR=llvm-ar"
57-
set "AS=llvm-as"
58-
set "CC=clang"
59-
set "RANLIB=echo"
60-
call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" amd64
61-
clang --version
62-
python -m build --wheel
63-
shell: cmd
64-
- name: Build wheel (Windows)
65-
if: startsWith(matrix.os, 'windows')
66-
run: |
6770
set "PATH=C:\Program Files\LLVM\bin;%PATH%"
6871
set "AR=llvm-ar"
6972
set "AS=llvm-as"
@@ -76,42 +79,22 @@ jobs:
7679

7780
- name: Build wheel (Mac)
7881
if: startsWith(matrix.os, 'macos')
79-
run: |
80-
python -m build --wheel
81-
82-
- name: Build wheel (Linux / clang)
83-
if: startsWith(matrix.os, 'ubuntu') && matrix.python_version == '3.6'
8482
run: |
8583
clang --version
86-
CC=clang python -m build --wheel
84+
python -m build --wheel
8785
88-
- name: Build wheel (Linux / gcc-9)
89-
if: startsWith(matrix.os, 'ubuntu') && (matrix.python_version == '3.7' || matrix.python_version == '3.8')
86+
- name: Build wheel (Linux / gcc)
87+
if: startsWith(matrix.os, 'ubuntu') && matrix.cc == ''
9088
run: |
91-
sudo apt update
92-
sudo apt install gcc-9
93-
gcc-9 --version
94-
CC=gcc-9 python -m build --wheel
89+
gcc --version
90+
python -m build --wheel
9591
96-
- name: Build wheel (Linux / gcc-10)
97-
if: startsWith(matrix.os, 'ubuntu') && matrix.python_version == '3.9'
98-
run: |
99-
sudo apt update
100-
sudo apt install gcc-10
101-
gcc-10 --version
102-
CC=gcc-10 python -m build --wheel
103-
- name: Build wheel (Linux / clang-13)
104-
if: startsWith(matrix.os, 'ubuntu') && matrix.python_version == '3.10'
92+
- name: Build wheel (Linux / clang)
93+
if: startsWith(matrix.os, 'ubuntu') && matrix.cc == 'clang'
10594
run: |
10695
clang --version
10796
CC=clang python -m build --wheel
10897
109-
- name: Build wheel (Linux / gcc)
110-
if: startsWith(matrix.os, 'ubuntu') && (matrix.python_version == '3.11' || matrix.python_version == '3.12')
111-
run: |
112-
gcc --version
113-
CC=gcc python -m build --wheel
114-
11598
# TODO: install mypy from requirements if reenabled
11699
- name: Run mypy
117100
shell: bash

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ blis/cy.c
66
blis/py.c
77
.eggs
88
.env/
9-
env3.6
9+
env/
1010
.hypothesis/
1111
build/
1212
cache/

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ architectures. For example, here's how to build support for the ARM architecture
5555
```bash
5656
git clone https://github.com/explosion/cython-blis && cd cython-blis
5757
git pull && git submodule init && git submodule update && git submodule status
58-
python3 -m venv env3.6
59-
source env3.6/bin/activate
58+
python3 -m venv env
59+
source env/bin/activate
6060
pip install -r requirements.txt
6161
./bin/generate-make-jsonl linux cortexa57
6262
BLIS_ARCH="cortexa57" python setup.py build_ext --inplace
@@ -130,8 +130,8 @@ build the jsonl files for the generic arch:
130130
git clone https://github.com/explosion/cython-blis && cd cython-blis
131131
git pull && git submodule init && git submodule update && git submodule
132132
status
133-
/opt/python/cp36-cp36m/bin/python -m venv env3.6
134-
source env3.6/bin/activate
133+
/opt/python/cp36-cp36m/bin/python -m venv env
134+
source env/bin/activate
135135
pip install -r requirements.txt
136136
./bin/generate-make-jsonl linux generic --export
137137
BLIS_ARCH=generic python setup.py build_ext --inplace

azure-pipelines.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ jobs:
1010
condition: true
1111
strategy:
1212
matrix:
13-
Python39Mac:
13+
Python310Mac:
1414
imageName: 'macos-latest'
15-
python.version: '3.9'
16-
Python39Windows:
15+
python.version: '3.10'
16+
Python310Windows:
1717
imageName: 'windows-latest'
18-
python.version: '3.9'
19-
Python39Linux:
18+
python.version: '3.10'
19+
Python310Linux:
2020
imageName: 'ubuntu-22.04'
21-
python.version: '3.9'
21+
python.version: '3.10'
2222

2323
maxParallel: 4
2424
pool:
@@ -80,15 +80,15 @@ jobs:
8080
condition: true
8181
strategy:
8282
matrix:
83-
Python39Mac:
83+
Python310Mac:
8484
imageName: 'macos-latest'
85-
python.version: '3.9'
86-
Python39Windows:
85+
python.version: '3.10'
86+
Python310Windows:
8787
imageName: 'windows-latest'
88-
python.version: '3.9'
89-
Python39Linux:
88+
python.version: '3.10'
89+
Python310Linux:
9090
imageName: 'ubuntu-22.04'
91-
python.version: '3.9'
91+
python.version: '3.10'
9292
maxParallel: 4
9393
pool:
9494
vmImage: $(imageName)

build-constraints.txt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,2 @@
11
# build version constraints for use with wheelwright + multibuild
2-
numpy==1.15.0; python_version<='3.7' and platform_machine!='aarch64'
3-
numpy==1.19.2; python_version<='3.7' and platform_machine=='aarch64'
4-
numpy==1.17.3; python_version=='3.8' and platform_machine!='aarch64'
5-
numpy==1.19.2; python_version=='3.8' and platform_machine=='aarch64'
6-
numpy>=2.0.0,<3.0.0; python_version>='3.9'
2+
numpy>=2.0.0,<3.0.0

requirements.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# Test requirements
2-
numpy>=1.15.0; python_version < "3.9"
3-
numpy>=1.19.0; python_version >= "3.9"
2+
numpy>=1.21.2
43
pytest
54
cython>=3.0,<4.0
65
hypothesis>=4.0.0,<7.0.0

setup.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -306,8 +306,7 @@ def chdir(new_dir):
306306
"numpy>=2.0.0,<3.0.0",
307307
],
308308
install_requires=[
309-
"numpy>=1.15.0,<3.0.0; python_version < '3.9'",
310-
"numpy>=1.19.0,<3.0.0; python_version >= '3.9'",
309+
"numpy>=1.21.2,<3.0.0",
311310
],
312311
ext_modules=cythonize(
313312
[
@@ -324,7 +323,7 @@ def chdir(new_dir):
324323
],
325324
language_level=3,
326325
),
327-
python_requires=">=3.9,<3.15",
326+
python_requires=">=3.10,<3.15",
328327
cmdclass={"build_ext": ExtensionBuilder},
329328
package_data={"": ["*.json", "*.jsonl", "*.pyx", "*.pxd"]},
330329
name="blis",

0 commit comments

Comments
 (0)