Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/cibuildwheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
# macos-15-intel is an intel runner, macos-latest is apple silicon
os: [ubuntu-latest, macos-15-intel, macos-latest, ubuntu-24.04-arm, windows-latest]
os:
- ubuntu-latest # x64
- ubuntu-24.04-arm # ARM
- macos-15-intel # x64
- macos-latest # ARM
- windows-latest # x64

steps:
# See https://cibuildwheel.pypa.io/en/1.x/cpp_standards/
Expand Down
67 changes: 25 additions & 42 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,24 @@ jobs:
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, windows-2022]
python_version: ["3.9", "3.10", "3.11", "3.12"]
os:
- ubuntu-latest # x64
- ubuntu-24.04-arm # ARM
- macos-15-intel # x64
- macos-latest # ARM
- windows-latest # x64
python_version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
cc: [''] # default: gcc on Linux; clang on Mac/Windows
include:
# Note: default compiler for Linux is gcc. cibuildwheel uses gcc.
# FIXME: clang crashes on ARM Linux
- os: ubuntu-latest
python_version: "3.10"
cc: clang
- os: ubuntu-latest
python_version: "3.14"
cc: clang

runs-on: ${{ matrix.os }}

steps:
Expand All @@ -34,7 +50,6 @@ jobs:
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python_version }}
architecture: x64

# Install LLVM 18 on Windows
- name: Install LLVM 18 on Windows
Expand All @@ -52,18 +67,6 @@ jobs:
run: |
dir "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build" /b

set "PATH=C:\\Program Files\\LLVM\\bin;%PATH%"
set "AR=llvm-ar"
set "AS=llvm-as"
set "CC=clang"
set "RANLIB=echo"
call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" amd64
clang --version
python -m build --wheel
shell: cmd
- name: Build wheel (Windows)
if: startsWith(matrix.os, 'windows')
run: |
Comment on lines -55 to -66

@crusaderky crusaderky Nov 24, 2025

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was duplicated

set "PATH=C:\Program Files\LLVM\bin;%PATH%"
set "AR=llvm-ar"
set "AS=llvm-as"
Expand All @@ -76,42 +79,22 @@ jobs:

- name: Build wheel (Mac)
if: startsWith(matrix.os, 'macos')
run: |
python -m build --wheel

- name: Build wheel (Linux / clang)
if: startsWith(matrix.os, 'ubuntu') && matrix.python_version == '3.6'
run: |
clang --version
CC=clang python -m build --wheel
python -m build --wheel

- name: Build wheel (Linux / gcc-9)
if: startsWith(matrix.os, 'ubuntu') && (matrix.python_version == '3.7' || matrix.python_version == '3.8')
- name: Build wheel (Linux / gcc)
if: startsWith(matrix.os, 'ubuntu') && matrix.cc == ''
run: |
sudo apt update
sudo apt install gcc-9
gcc-9 --version
CC=gcc-9 python -m build --wheel
gcc --version
python -m build --wheel

- name: Build wheel (Linux / gcc-10)
if: startsWith(matrix.os, 'ubuntu') && matrix.python_version == '3.9'
run: |
sudo apt update
sudo apt install gcc-10
gcc-10 --version
CC=gcc-10 python -m build --wheel
- name: Build wheel (Linux / clang-13)
if: startsWith(matrix.os, 'ubuntu') && matrix.python_version == '3.10'
- name: Build wheel (Linux / clang)
if: startsWith(matrix.os, 'ubuntu') && matrix.cc == 'clang'
run: |
clang --version
CC=clang python -m build --wheel
Comment on lines 80 to 96

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section is slightly more verbose than it could be, for the sake of readibility.


- name: Build wheel (Linux / gcc)
if: startsWith(matrix.os, 'ubuntu') && (matrix.python_version == '3.11' || matrix.python_version == '3.12')
run: |
gcc --version
CC=gcc python -m build --wheel

# TODO: install mypy from requirements if reenabled
- name: Run mypy
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ blis/cy.c
blis/py.c
.eggs
.env/
env3.6
env/
.hypothesis/
build/
cache/
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ architectures. For example, here's how to build support for the ARM architecture
```bash
git clone https://github.com/explosion/cython-blis && cd cython-blis
git pull && git submodule init && git submodule update && git submodule status
python3 -m venv env3.6
source env3.6/bin/activate
python3 -m venv env
source env/bin/activate
pip install -r requirements.txt
./bin/generate-make-jsonl linux cortexa57
BLIS_ARCH="cortexa57" python setup.py build_ext --inplace
Expand Down Expand Up @@ -130,8 +130,8 @@ build the jsonl files for the generic arch:
git clone https://github.com/explosion/cython-blis && cd cython-blis
git pull && git submodule init && git submodule update && git submodule
status
/opt/python/cp36-cp36m/bin/python -m venv env3.6
source env3.6/bin/activate
/opt/python/cp36-cp36m/bin/python -m venv env
source env/bin/activate
pip install -r requirements.txt
./bin/generate-make-jsonl linux generic --export
BLIS_ARCH=generic python setup.py build_ext --inplace
Expand Down
24 changes: 12 additions & 12 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ jobs:
condition: true
strategy:
matrix:
Python39Mac:
Python310Mac:
imageName: 'macos-latest'
python.version: '3.9'
Python39Windows:
python.version: '3.10'
Python310Windows:
imageName: 'windows-latest'
python.version: '3.9'
Python39Linux:
python.version: '3.10'
Python310Linux:
imageName: 'ubuntu-22.04'
python.version: '3.9'
python.version: '3.10'

maxParallel: 4
pool:
Expand Down Expand Up @@ -80,15 +80,15 @@ jobs:
condition: true
strategy:
matrix:
Python39Mac:
Python310Mac:
imageName: 'macos-latest'
python.version: '3.9'
Python39Windows:
python.version: '3.10'
Python310Windows:
imageName: 'windows-latest'
python.version: '3.9'
Python39Linux:
python.version: '3.10'
Python310Linux:
imageName: 'ubuntu-22.04'
python.version: '3.9'
python.version: '3.10'
maxParallel: 4
pool:
vmImage: $(imageName)
Expand Down
6 changes: 1 addition & 5 deletions build-constraints.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
# build version constraints for use with wheelwright + multibuild
numpy==1.15.0; python_version<='3.7' and platform_machine!='aarch64'
numpy==1.19.2; python_version<='3.7' and platform_machine=='aarch64'
numpy==1.17.3; python_version=='3.8' and platform_machine!='aarch64'
numpy==1.19.2; python_version=='3.8' and platform_machine=='aarch64'
numpy>=2.0.0,<3.0.0; python_version>='3.9'
numpy>=2.0.0,<3.0.0
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Test requirements
numpy>=1.15.0; python_version < "3.9"
numpy>=1.19.0; python_version >= "3.9"
numpy>=1.21.2

@crusaderky crusaderky Nov 25, 2025

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the oldest numpy that supports python 3.10
Follow-up:

pytest
cython>=3.0,<4.0
hypothesis>=4.0.0,<7.0.0
5 changes: 2 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,7 @@ def chdir(new_dir):
"numpy>=2.0.0,<3.0.0",
],
install_requires=[
"numpy>=1.15.0,<3.0.0; python_version < '3.9'",
"numpy>=1.19.0,<3.0.0; python_version >= '3.9'",
"numpy>=1.21.2,<3.0.0",
],
ext_modules=cythonize(
[
Expand All @@ -324,7 +323,7 @@ def chdir(new_dir):
],
language_level=3,
),
python_requires=">=3.9,<3.15",
python_requires=">=3.10,<3.15",
cmdclass={"build_ext": ExtensionBuilder},
package_data={"": ["*.json", "*.jsonl", "*.pyx", "*.pxd"]},
name="blis",
Expand Down