Skip to content

Commit

Permalink
Merge pull request #14949 from pllim/drop-oldest-supported-numpy
Browse files Browse the repository at this point in the history
Build: Replace oldest-supported-numpy
  • Loading branch information
pllim committed Aug 18, 2023
2 parents 05ebb1d + 6aba670 commit ac21802
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
requires = ["setuptools",
"setuptools_scm>=6.2",
"cython==0.29.34",
"oldest-supported-numpy",
"numpy>=1.25,<2",
"extension-helpers"]
build-backend = 'setuptools.build_meta'

Expand Down
9 changes: 8 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,11 @@

from extension_helpers import get_extensions # noqa: E402

setup(ext_modules=get_extensions())
ext_modules = get_extensions()

# Specify the minimum version for the Numpy C-API
for ext in ext_modules:
if ext.include_dirs and "numpy" in ext.include_dirs[0]:
ext.define_macros.append(("NPY_TARGET_VERSION", "NPY_1_21_API_VERSION"))

setup(ext_modules=ext_modules)

0 comments on commit ac21802

Please sign in to comment.