[Numpy-svn] r6392 - branches/coremath/numpy/core

numpy-svn@scip... numpy-svn@scip...
Wed Feb 18 11:29:06 CST 2009


Author: cdavid
Date: 2009-02-18 11:28:57 -0600 (Wed, 18 Feb 2009)
New Revision: 6392

Modified:
   branches/coremath/numpy/core/setup.py
Log:
Build npymath lib.

Modified: branches/coremath/numpy/core/setup.py
===================================================================
--- branches/coremath/numpy/core/setup.py	2009-02-18 17:28:30 UTC (rev 6391)
+++ branches/coremath/numpy/core/setup.py	2009-02-18 17:28:57 UTC (rev 6392)
@@ -383,6 +383,23 @@
     if sys.platform == 'cygwin':
         config.add_data_dir('include/numpy/fenv')
 
+    config.add_extension('_sort',
+                         sources=[join('src','_sortmodule.c.src'),
+                                  generate_config_h,
+                                  generate_numpyconfig_h,
+                                  generate_numpy_api,
+                                  ],
+                         )
+
+    # npymath needs the config.h and numpyconfig.h files to be generated, but
+    # build_clib cannot handle generate_config_h and generate_numpyconfig_h
+    # (don't ask). Because clib are generated before extensions, we have to
+    # explicitely add an extension which has generate_config_h and
+    # generate_numpyconfig_h as sources *before* adding npymath.
+    config.add_library('npymath', 
+            sources=[join('src', 'npy_math.c.src')],
+            depends=[])
+
     config.add_extension('multiarray',
                          sources = [join('src','multiarraymodule.c'),
                                     generate_config_h,
@@ -414,14 +431,6 @@
                                     ]+deps,
                          )
 
-    config.add_extension('_sort',
-                         sources=[join('src','_sortmodule.c.src'),
-                                  generate_config_h,
-                                  generate_numpyconfig_h,
-                                  generate_numpy_api,
-                                  ],
-                         )
-
     config.add_extension('scalarmath',
                          sources=[join('src','scalarmathmodule.c.src'),
                                   generate_config_h,



More information about the Numpy-svn mailing list