[Numpy-svn] r8543 - in branches/1.4.x/numpy/core: . include/numpy
numpy-svn at scipy.org
numpy-svn at scipy.org
Wed Jul 28 21:39:55 EDT 2010
Author: cdavid
Date: 2010-07-28 20:39:55 -0500 (Wed, 28 Jul 2010)
New Revision: 8543
Modified:
branches/1.4.x/numpy/core/SConscript
branches/1.4.x/numpy/core/include/numpy/_numpyconfig.h.in
branches/1.4.x/numpy/core/setup.py
Log:
BUG: look for endian.h.
We should use this header in npy_endian.h if available.
(cherry picked from commit 6f59b03b86868794328a39bd0542cc47957d2c80)
Modified: branches/1.4.x/numpy/core/SConscript
===================================================================
--- branches/1.4.x/numpy/core/SConscript 2010-07-29 01:39:36 UTC (rev 8542)
+++ branches/1.4.x/numpy/core/SConscript 2010-07-29 01:39:55 UTC (rev 8543)
@@ -78,6 +78,10 @@
Configuration error log says: \n\n%s""" % ''.join(errmsg)
Exit(-1)
+st = config.CheckHeader("endian.h")
+if st:
+ numpyconfig_sym.append(('DEFINE_NPY_HAVE_ENDIAN_H', '#define NPY_HAVE_ENDIAN_H 1'))
+
def check_type(type, include = None):
st = config.CheckTypeSize(type, includes = include)
type = type.replace(' ', '_')
Modified: branches/1.4.x/numpy/core/include/numpy/_numpyconfig.h.in
===================================================================
--- branches/1.4.x/numpy/core/include/numpy/_numpyconfig.h.in 2010-07-29 01:39:36 UTC (rev 8542)
+++ branches/1.4.x/numpy/core/include/numpy/_numpyconfig.h.in 2010-07-29 01:39:55 UTC (rev 8543)
@@ -40,6 +40,8 @@
#define NPY_ABI_VERSION @NPY_ABI_VERSION@
#define NPY_API_VERSION @NPY_API_VERSION@
+ at DEFINE_NPY_HAVE_ENDIAN_H@
+
/* 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
Modified: branches/1.4.x/numpy/core/setup.py
===================================================================
--- branches/1.4.x/numpy/core/setup.py 2010-07-29 01:39:36 UTC (rev 8542)
+++ branches/1.4.x/numpy/core/setup.py 2010-07-29 01:39:55 UTC (rev 8543)
@@ -245,6 +245,10 @@
raise SystemError(
"Cannot compiler 'Python.h'. Perhaps you need to "\
"install python-dev|python-devel.")
+ res = config_cmd.check_header("endian.h")
+ if res:
+ private_defines.append(('HAVE_ENDIAN_H', 1))
+ public_defines.append(('NPY_HAVE_ENDIAN_H', 1))
# Check basic types sizes
for type in ('short', 'int', 'long'):
More information about the Numpy-svn
mailing list