Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add the ABI/API version in numpyconfig header for scons build.

  • Loading branch information...
commit 93aa731a11abd6a6997f83d5e820b9b7a4025780 1 parent 290e39d
@cournape cournape authored
View
4 numpy/core/SConscript
@@ -209,6 +209,10 @@ def visibility_define():
numpyconfig_sym.append(('VISIBILITY_HIDDEN', visibility_define()))
+# Add the C API/ABI versions
+numpyconfig_sym.append(('NPY_ABI_VERSION', '0x%.8X' % C_ABI_VERSION))
+numpyconfig_sym.append(('NPY_API_VERSION', '0x%.8X' % C_API_VERSION))
+
# Check whether we need our own wide character support
if not config.CheckDeclaration('Py_UNICODE_WIDE', includes='#include <Python.h>'):
PYTHON_HAS_UNICODE_WIDE = True
View
3  numpy/core/include/numpy/numpyconfig.h.in
@@ -26,6 +26,9 @@
#define NPY_USE_C99_FORMATS @USE_C99_FORMATS@
+#define NPY_ABI_VERSION @NPY_ABI_VERSION@
+#define NPY_API_VERSION @NPY_API_VERSION@
+
/* Ugly, but we can't test this in a proper manner without requiring a C++
* compiler at the configuration stage of numpy ? */
#ifndef __STDC_FORMAT_MACROS
Please sign in to comment.
Something went wrong with that request. Please try again.