Skip to content

Commit

Permalink
Merge pull request #4607 from neutrinoceros/no_npy_deprecated_api
Browse files Browse the repository at this point in the history
BLD: forbid deprecated numpy C API
  • Loading branch information
chrishavlin authored Aug 3, 2023
2 parents 192a187 + 443e291 commit 410618d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions setupext.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,12 @@ def finalize_options(self):
self.include_dirs.append(numpy.get_include())
self.include_dirs.append(ewah_bool_utils.get_include())

define_macros = [("NPY_NO_DEPRECATED_API", "NPY_1_7_API_VERSION")]
if self.define is None:
self.define = define_macros
else:
self.define.extend(define_macros)

def build_extensions(self):
self.check_extensions_list(self.extensions)

Expand Down

0 comments on commit 410618d

Please sign in to comment.