Skip to content

Commit

Permalink
Build with numpy==2.0
Browse files Browse the repository at this point in the history
This is in lei with their advice on being ABI compatible with both numpy
2.x and 1.x.

It's also the opposite way to how ABI issues are normally kept away and
I don't feel much confidence in NumPy's packaging strategies so I've
added testing against the oldest supported numpy rather than take it on
trust that we're not breaking 1.x compatibility.

Closes #23
  • Loading branch information
bwoodsend committed Aug 9, 2024
1 parent fbadd29 commit ad75a47
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- uses: actions/setup-python@v3

- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.16.2
run: python -m pip install cibuildwheel

# We need docker's cross architecture emulation to build ARM wheels.
- if: startsWith(matrix.os, 'ubuntu')
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest, macos-13, windows-latest]
python-version: [3.7, 3.8, 3.9, '3.10', 3.11, 3.12]
fail-fast: false

Expand All @@ -31,3 +31,7 @@ jobs:

# Test
- run: pytest

# Test again with oldest NumPy for ABI incompatibilities
- run: pip install --force-reinstall oldest-supported-numpy trimesh
- run: pytest
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.2.0
0.2.1
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@ requires = [
"setuptools",
"wheel",
"cython",
"oldest-supported-numpy",
# NumPy must be locked in order to support 1.x and 2.x
"numpy==2.0; python_version >= '3.9'",
# Unless building for a Python version that NumPy 2.x doesn't support
"oldest-supported-numpy; python_version <= '3.8'",
]

0 comments on commit ad75a47

Please sign in to comment.