Permalink
Browse files

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

  • Loading branch information...
1 parent 290e39d commit 93aa731a11abd6a6997f83d5e820b9b7a4025780 @cournape cournape committed May 13, 2009
Showing with 7 additions and 0 deletions.
  1. +4 −0 numpy/core/SConscript
  2. +3 −0 numpy/core/include/numpy/numpyconfig.h.in
View
@@ -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
@@ -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

0 comments on commit 93aa731

Please sign in to comment.