diff --git a/erfa/ufunc.c.templ b/erfa/ufunc.c.templ index 98bdbb5..ae7c45d 100644 --- a/erfa/ufunc.c.templ +++ b/erfa/ufunc.c.templ @@ -17,6 +17,11 @@ #include "erfa.h" #include "erfaextra.h" +// Backported NumPy 2 API (can be removed if numpy 2 is required) +#if NPY_ABI_VERSION < 0x02000000 +#define PyDataType_ELSIZE(descr) ((descr)->elsize) +#endif + // On gcc<10 we can run into the following: // // error: dereferencing pointer to incomplete type 'PyTypeObject' diff --git a/pyproject.toml b/pyproject.toml index 287447c..0b46469 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,6 +3,6 @@ requires = [ "setuptools", "setuptools_scm>=6.2", "jinja2>=2.10.3", - "numpy" + "numpy>=1.25", ] build-backend = 'setuptools.build_meta'