Skip to content

Commit

Permalink
Support numpy 2.0
Browse files Browse the repository at this point in the history
Per numpy's instructions, build with numpy >= 1.25 and test with numpy
1.19.
  • Loading branch information
joaander committed May 23, 2024
1 parent ad2a8d6 commit 7a1beb0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .github/requirements-oldest-numpy.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pytest==8.2.1
numpy==1.19.3; python_version=='3.9'
numpy==1.21.6; python_version=='3.10'
numpy==1.23.2; python_version=='3.11'
numpy==1.26.2; python_version=='3.12'
2 changes: 1 addition & 1 deletion .github/workflows/build_wheels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
version: 13
arch: 'x86_64'

python: ['cp38', 'cp39', 'cp310', 'cp311', 'cp312']
python: ['cp39', 'cp310', 'cp311', 'cp312']

steps:
- uses: actions/[email protected]
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ classifiers=[
"License :: OSI Approved :: BSD License",
"Topic :: Scientific/Engineering :: Physics",
]
dependencies = ["numpy>=1.9.3"]
dependencies = ["numpy>=1.19.0"]

[project.scripts]
gsd = "gsd.__main__:main"
Expand All @@ -36,12 +36,12 @@ packages = ["gsd", "gsd.test"]
requires = ["setuptools>=64.0.0",
"wheel",
"Cython",
"oldest-supported-numpy"]
"numpy>=2.0.0rc1"]

[tool.cibuildwheel]
# Test the wheels.
test-command = "pytest --pyargs gsd -v --log-level=DEBUG"
test-requires = "pytest"
before-test = "python3 -m pip install -r .github/requirements-oldest-numpy.txt --no-binary :all: --force-reinstall"

# Build on 64-bit architectures.
archs = ["auto64"]
Expand Down

0 comments on commit 7a1beb0

Please sign in to comment.