Skip to content

Commit 6164898

Browse files
committed
Add support for numpy 2
1 parent 045d489 commit 6164898

File tree

5 files changed

+22
-23
lines changed

5 files changed

+22
-23
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
source: ["conda-forge"]
1919
# os: ["ubuntu-latest"]
2020
# source: ["source"]
21-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
21+
python-version: ["3.9", "3.10", "3.11", "3.12"]
2222
steps:
2323
- name: Checkout
2424
uses: actions/checkout@v4

.github/workflows/wheels.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,9 @@ jobs:
170170
# SUITESPARSE_MACOS_ARCH asks to build a particular architecture. Either x86 or arm64.
171171
CIBW_ENVIRONMENT_MACOS: BREW_LIBOMP="1" SUITESPARSE_MACOS_ARCH=${{ matrix.cibw_archs }}
172172

173+
# Select CPython and PyPy for 3.9, 3.10, 3.11, 3.12
174+
CIBW_BUILD: "{c,p}p3{9,10,11,12}-*"
175+
173176
# Uncomment to only build CPython wheels
174177
# CIBW_BUILD: "cp*"
175178

.pre-commit-config.yaml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ default_language_version:
99
python: python3
1010
repos:
1111
- repo: https://github.com/pre-commit/pre-commit-hooks
12-
rev: v4.4.0
12+
rev: v4.6.0
1313
hooks:
1414
- id: check-added-large-files
1515
- id: check-ast
@@ -20,43 +20,43 @@ repos:
2020
- id: mixed-line-ending
2121
# - id: trailing-whitespace
2222
- repo: https://github.com/abravalheri/validate-pyproject
23-
rev: v0.14
23+
rev: v0.19
2424
hooks:
2525
- id: validate-pyproject
2626
name: Validate pyproject.toml
2727
- repo: https://github.com/PyCQA/autoflake
28-
rev: v2.2.1
28+
rev: v2.3.1
2929
hooks:
3030
- id: autoflake
3131
args: [--in-place]
3232
- repo: https://github.com/pycqa/isort
33-
rev: 5.12.0
33+
rev: 5.13.2
3434
hooks:
3535
- id: isort
3636
- repo: https://github.com/asottile/pyupgrade
37-
rev: v3.13.0
37+
rev: v3.17.0
3838
hooks:
3939
- id: pyupgrade
40-
args: [--py38-plus]
40+
args: [--py39-plus]
4141
# - repo: https://github.com/MarcoGorelli/auto-walrus
4242
# rev: v0.2.2
4343
# hooks:
4444
# - id: auto-walrus
4545
# args: [--line-length, "100"]
4646
- repo: https://github.com/psf/black
47-
rev: 23.9.1
47+
rev: 24.8.0
4848
hooks:
4949
- id: black
5050
# - id: black-jupyter
5151
- repo: https://github.com/PyCQA/flake8
52-
rev: 6.1.0
52+
rev: 7.1.1
5353
hooks:
5454
- id: flake8
5555
additional_dependencies: &flake8_dependencies
5656
# These versions need updated manually
57-
- flake8==6.1.0
58-
- flake8-comprehensions==3.14.0
59-
- flake8-bugbear==23.9.16
57+
- flake8==7.1.1
58+
- flake8-comprehensions==3.15.0
59+
- flake8-bugbear==24.8.19
6060
# - flake8-simplify==0.20.0
6161
- repo: https://github.com/asottile/yesqa
6262
rev: v1.5.0
@@ -71,6 +71,6 @@ repos:
7171
# - id: pyroma
7272
# args: [-n, "10", .]
7373
- repo: https://github.com/pre-commit/pre-commit-hooks
74-
rev: v4.4.0
74+
rev: v4.6.0
7575
hooks:
7676
- id: no-commit-to-branch # no commit directly to main

pyproject.toml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,15 @@ requires = [
66
"wheel",
77
"cffi>=1.11",
88
"cython",
9-
"oldest-supported-numpy; platform_python_implementation != 'PyPy'",
10-
# Inspired by SciPy: unpin numpy version for PyPy builds,
11-
# as oldest-supported-numpy does not take PyPy into account.
12-
"numpy; platform_python_implementation=='PyPy'",
9+
"numpy>=2.0",
1310
]
1411

1512
[project]
1613
name = "suitesparse-graphblas"
1714
dynamic = ["version"]
1815
description = "SuiteSparse:GraphBLAS Python bindings."
1916
readme = "README.md"
20-
requires-python = ">=3.8"
17+
requires-python = ">=3.9"
2118
license = {file = "LICENSE"}
2219
authors = [
2320
{name = "Erik Welch", email = "erik.n.welch@gmail.com"},
@@ -53,7 +50,6 @@ classifiers = [
5350
"Operating System :: Microsoft :: Windows",
5451
"Programming Language :: Python",
5552
"Programming Language :: Python :: 3",
56-
"Programming Language :: Python :: 3.8",
5753
"Programming Language :: Python :: 3.9",
5854
"Programming Language :: Python :: 3.10",
5955
"Programming Language :: Python :: 3.11",
@@ -68,9 +64,8 @@ classifiers = [
6864
"Topic :: Software Development :: Libraries :: Python Modules",
6965
]
7066
dependencies = [
71-
# These are super-old; can/should we update them?
72-
"cffi>=1.11",
73-
"numpy>=1.19",
67+
"cffi>=1.15",
68+
"numpy>=1.23",
7469
]
7570
[project.urls]
7671
homepage = "https://github.com/GraphBLAS/python-suitesparse-graphblas"
@@ -96,7 +91,7 @@ dirty_template = "{tag}+{ccount}.g{sha}.dirty"
9691

9792
[tool.black]
9893
line-length = 100
99-
target-version = ["py38", "py39", "py310", "py311"]
94+
target-version = ["py39", "py310", "py311", "py312"]
10095

10196
[tool.isort]
10297
sections = ["FUTURE", "STDLIB", "THIRDPARTY", "FIRSTPARTY", "LOCALFOLDER"]

suitesparse_graphblas/create_headers.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
Run `python create_headers.py --help` to see more help.
2222
2323
"""
24+
2425
import argparse
2526
import os
2627
import re

0 commit comments

Comments
 (0)