summaryrefslogtreecommitdiff
path: root/numpy/distutils
diff options
context:
space:
mode:
authorDavid Cournapeau <cournape@gmail.com>2008-01-06 10:09:33 +0000
committerDavid Cournapeau <cournape@gmail.com>2008-01-06 10:09:33 +0000
commit9cb2d68f550e6277187117cab1f7fb9b08f3146c (patch)
tree65ca1abf42a147eff6afa0e20b72902577846ea7 /numpy/distutils
parent055499c61699cdf5f1ea81924dacdf5e39945992 (diff)
parent9964880dbb4cf382142e5a4c176142ea81fc0356 (diff)
downloadnumpy-9cb2d68f550e6277187117cab1f7fb9b08f3146c.tar.gz
Merged revisions 4612-4617,4628-4631,4638 via svnmerge from
http://svn.scipy.org/svn/numpy/branches/cleanconfig_rtm ................ r4612 | cdavid | 2007-12-18 17:58:13 +0900 (Tue, 18 Dec 2007) | 3 lines Initialized merge tracking via "svnmerge" with revisions "1-4611" from http://svn.scipy.org/svn/numpy/trunk ................ r4613 | cdavid | 2007-12-18 18:26:38 +0900 (Tue, 18 Dec 2007) | 1 line Clean ndarrayobject.h headers: do not use SIZEOF_*, but NPY_SIZEOF... ................ r4614 | cdavid | 2007-12-18 18:33:11 +0900 (Tue, 18 Dec 2007) | 1 line Refactor the NPY_ALLOW_THREAD logic outside config.h generation, and put it inside numpy headers ................ r4615 | cdavid | 2007-12-18 18:46:34 +0900 (Tue, 18 Dec 2007) | 1 line separate config.h (private header) and numpyconfig.h (public header) ................ r4616 | cdavid | 2007-12-18 18:57:21 +0900 (Tue, 18 Dec 2007) | 2 lines Add CHAR_BITS as a public symbol in numpyconfig header ................ r4617 | cdavid | 2007-12-18 19:05:38 +0900 (Tue, 18 Dec 2007) | 1 line Fix escaping problem when generating numpyconfig.h on win32 ................ r4628 | cdavid | 2007-12-22 12:20:08 +0900 (Sat, 22 Dec 2007) | 1 line Add code to test for a declaration in header ................ r4629 | cdavid | 2007-12-22 14:52:38 +0900 (Sat, 22 Dec 2007) | 1 line Add a check_decl function to check for declaration ................ r4630 | cdavid | 2007-12-22 15:28:11 +0900 (Sat, 22 Dec 2007) | 1 line Remove distutils test for C declaration from numpy.core, since it is put in distutils now ................ r4631 | cdavid | 2007-12-22 15:58:15 +0900 (Sat, 22 Dec 2007) | 18 lines Merged revisions 4612-4630 via svnmerge from http://svn.scipy.org/svn/numpy/trunk ........ r4620 | cdavid | 2007-12-18 19:41:22 +0900 (Tue, 18 Dec 2007) | 3 lines Initialized merge tracking via "svnmerge" with revisions "1-4619" from http://svn.scipy.org/svn/numpy/branches/distutils_scons_command ........ r4624 | rc | 2007-12-20 19:30:45 +0900 (Thu, 20 Dec 2007) | 2 lines fixed setmember1d for string arrays ........ r4626 | stefan | 2007-12-21 18:00:24 +0900 (Fri, 21 Dec 2007) | 2 lines Add test for setdiff1d on character arrays. ........ ................ r4638 | cdavid | 2007-12-22 18:21:25 +0900 (Sat, 22 Dec 2007) | 1 line Get MATHLIB from numpyconfig.h, not from config.h anymore ................
Diffstat (limited to 'numpy/distutils')
-rw-r--r--numpy/distutils/command/config.py15
-rw-r--r--numpy/distutils/misc_util.py4
2 files changed, 17 insertions, 2 deletions
diff --git a/numpy/distutils/command/config.py b/numpy/distutils/command/config.py
index 41c8f4f02..ce42a36e0 100644
--- a/numpy/distutils/command/config.py
+++ b/numpy/distutils/command/config.py
@@ -101,6 +101,21 @@ class config(old_config):
(body, headers, include_dirs,
libraries, library_dirs, lang))
+ def check_decl(self, symbol,
+ headers=None, include_dirs=None):
+ self._check_compiler()
+ body = """
+int main()
+{
+#ifndef %s
+ (void) %s;
+#endif
+ ;
+ return 0;
+}""" % (symbol, symbol)
+
+ return self.try_compile(body, headers, include_dirs)
+
def check_func(self, func,
headers=None, include_dirs=None,
libraries=None, library_dirs=None,
diff --git a/numpy/distutils/misc_util.py b/numpy/distutils/misc_util.py
index 79fdd46ec..9777d14b2 100644
--- a/numpy/distutils/misc_util.py
+++ b/numpy/distutils/misc_util.py
@@ -112,11 +112,11 @@ def njoin(*path):
return minrelpath(joined)
def get_mathlibs(path=None):
- """Return the MATHLIB line from config.h
+ """Return the MATHLIB line from numpyconfig.h
"""
if path is None:
path = os.path.join(get_numpy_include_dirs()[0], 'numpy')
- config_file = os.path.join(path,'config.h')
+ config_file = os.path.join(path,'numpyconfig.h')
fid = open(config_file)
mathlibs = []
s = '#define MATHLIB'