Skip to content

Commit

Permalink
fix build-time compat with numpy 1.x
Browse files Browse the repository at this point in the history
  • Loading branch information
neutrinoceros committed Mar 8, 2024
1 parent 5250b4b commit 5ab06b3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions erfa/ufunc.c.templ
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ requires = [
"setuptools",
"setuptools_scm>=6.2",
"jinja2>=2.10.3",
"numpy"
"numpy>=1.25",
]
build-backend = 'setuptools.build_meta'

0 comments on commit 5ab06b3

Please sign in to comment.