Skip to content

Commit

Permalink
Merge pull request #60 from neutrinoceros/drop_oldest_supported_numpy
Browse files Browse the repository at this point in the history
  • Loading branch information
neutrinoceros authored Aug 19, 2023
2 parents c85fb68 + 71ba6d0 commit 89a6f08
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
7 changes: 5 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ requires = [
"Cython>=3.0, <3.1",

# TODO: simplify numpy requirement after numpy 1.26.0 final is released
"oldest-supported-numpy ; python_version < '3.12.0rc1'",
"numpy>=1.26.0b1 ; python_version >= '3.12.0rc1'",
"oldest-supported-numpy ; python_version < '3.9'",
"numpy>=1.25, <2.0 ; python_version >= '3.9' and python_version < '3.12.0rc1'",
"numpy>=1.26.0b1, <2.0; python_version >= '3.12.0rc1'",
]

[project]
Expand All @@ -24,6 +25,8 @@ dependencies = [
# match the absolute oldest version of numpy with *any*
# level of support for our minimal Python requirement
# https://github.com/scipy/oldest-supported-numpy/issues/76#issuecomment-1628865694

# after Python 3.8 is dropped, keep in sync with NPY_TARGET_VERSION (setup.py)
"numpy>=1.17.3,<2.0",
]
classifiers = [
Expand Down
10 changes: 9 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
import sys

import numpy as np
from Cython.Build import cythonize
Expand All @@ -16,7 +17,14 @@
else:
std_libs = ["m"]

define_macros = [("NPY_NO_DEPRECATED_API", "NPY_1_7_API_VERSION")]
define_macros = [
("NPY_NO_DEPRECATED_API", "NPY_1_7_API_VERSION"),
]
if sys.version_info >= (3, 9):
# keep in sync with runtime requirements (pyproject.toml)
define_macros.append(("NPY_TARGET_VERSION", "NPY_1_18_API_VERSION"))
else:
pass

extensions = [
Extension(
Expand Down

0 comments on commit 89a6f08

Please sign in to comment.