Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for numpy v2 #130

Closed
wants to merge 1 commit into from
Closed
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
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
source: ["conda-forge"]
# os: ["ubuntu-latest"]
# source: ["source"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,9 @@ jobs:
# SUITESPARSE_MACOS_ARCH asks to build a particular architecture. Either x86 or arm64.
CIBW_ENVIRONMENT_MACOS: BREW_LIBOMP="1" SUITESPARSE_MACOS_ARCH=${{ matrix.cibw_archs }}

# Select CPython and PyPy for 3.9, 3.10, 3.11, 3.12
CIBW_BUILD: "{c,p}p3{9,10,11,12}-*"

# Uncomment to only build CPython wheels
# CIBW_BUILD: "cp*"

Expand Down
24 changes: 12 additions & 12 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ default_language_version:
python: python3
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.6.0
hooks:
- id: check-added-large-files
- id: check-ast
Expand All @@ -20,43 +20,43 @@ repos:
- id: mixed-line-ending
# - id: trailing-whitespace
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.14
rev: v0.19
hooks:
- id: validate-pyproject
name: Validate pyproject.toml
- repo: https://github.com/PyCQA/autoflake
rev: v2.2.1
rev: v2.3.1
hooks:
- id: autoflake
args: [--in-place]
- repo: https://github.com/pycqa/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort
- repo: https://github.com/asottile/pyupgrade
rev: v3.13.0
rev: v3.17.0
hooks:
- id: pyupgrade
args: [--py38-plus]
args: [--py39-plus]
# - repo: https://github.com/MarcoGorelli/auto-walrus
# rev: v0.2.2
# hooks:
# - id: auto-walrus
# args: [--line-length, "100"]
- repo: https://github.com/psf/black
rev: 23.9.1
rev: 24.8.0
hooks:
- id: black
# - id: black-jupyter
- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
rev: 7.1.1
hooks:
- id: flake8
additional_dependencies: &flake8_dependencies
# These versions need updated manually
- flake8==6.1.0
- flake8-comprehensions==3.14.0
- flake8-bugbear==23.9.16
- flake8==7.1.1
- flake8-comprehensions==3.15.0
- flake8-bugbear==24.8.19
# - flake8-simplify==0.20.0
- repo: https://github.com/asottile/yesqa
rev: v1.5.0
Expand All @@ -71,6 +71,6 @@ repos:
# - id: pyroma
# args: [-n, "10", .]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.6.0
hooks:
- id: no-commit-to-branch # no commit directly to main
15 changes: 5 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,15 @@ requires = [
"wheel",
"cffi>=1.11",
"cython",
"oldest-supported-numpy; platform_python_implementation != 'PyPy'",
# Inspired by SciPy: unpin numpy version for PyPy builds,
# as oldest-supported-numpy does not take PyPy into account.
"numpy; platform_python_implementation=='PyPy'",
"numpy>=2.0",
]

[project]
name = "suitesparse-graphblas"
dynamic = ["version"]
description = "SuiteSparse:GraphBLAS Python bindings."
readme = "README.md"
requires-python = ">=3.8"
requires-python = ">=3.9"
license = {file = "LICENSE"}
authors = [
{name = "Erik Welch", email = "[email protected]"},
Expand Down Expand Up @@ -53,7 +50,6 @@ classifiers = [
"Operating System :: Microsoft :: Windows",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
Expand All @@ -68,9 +64,8 @@ classifiers = [
"Topic :: Software Development :: Libraries :: Python Modules",
]
dependencies = [
# These are super-old; can/should we update them?
"cffi>=1.11",
"numpy>=1.19",
"cffi>=1.15",
"numpy>=1.23",
]
[project.urls]
homepage = "https://github.com/GraphBLAS/python-suitesparse-graphblas"
Expand All @@ -96,7 +91,7 @@ dirty_template = "{tag}+{ccount}.g{sha}.dirty"

[tool.black]
line-length = 100
target-version = ["py38", "py39", "py310", "py311"]
target-version = ["py39", "py310", "py311", "py312"]

[tool.isort]
sections = ["FUTURE", "STDLIB", "THIRDPARTY", "FIRSTPARTY", "LOCALFOLDER"]
Expand Down
1 change: 1 addition & 0 deletions suitesparse_graphblas/create_headers.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
Run `python create_headers.py --help` to see more help.

"""

import argparse
import os
import re
Expand Down
Loading