[Numpy-svn] r5599 - trunk/numpy/core

numpy-svn@scip... numpy-svn@scip...
Sun Aug 3 04:49:01 CDT 2008


Author: cdavid
Date: 2008-08-03 04:48:55 -0500 (Sun, 03 Aug 2008)
New Revision: 5599

Modified:
   trunk/numpy/core/setupscons.py
Log:
Fix generated file location for inclusion in sdist target when building with scons.


Modified: trunk/numpy/core/setupscons.py
===================================================================
--- trunk/numpy/core/setupscons.py	2008-08-03 09:48:36 UTC (rev 5598)
+++ trunk/numpy/core/setupscons.py	2008-08-03 09:48:55 UTC (rev 5599)
@@ -9,6 +9,7 @@
 
 def configuration(parent_package='',top_path=None):
     from numpy.distutils.misc_util import Configuration,dot_join
+    from numpy.distutils.command.scons import get_scons_pkg_build_dir
     from numpy.distutils.system_info import get_info, default_lib_dirs
 
     config = Configuration('core',parent_package,top_path)
@@ -40,7 +41,7 @@
         # XXX: I really have to think about how to communicate path info
         # between scons and distutils, and set the options at one single
         # location.
-        target = join(scons_build_dir, local_dir, 'config.h')
+        target = join(get_scons_pkg_build_dir(config.name), 'config.h')
         incl_dir = os.path.dirname(target)
         if incl_dir not in config.numpy_include_dirs:
             config.numpy_include_dirs.append(incl_dir)
@@ -50,7 +51,8 @@
         # XXX: I really have to think about how to communicate path info
         # between scons and distutils, and set the options at one single
         # location.
-        target = join(scons_build_dir, local_dir, 'include/numpy/numpyconfig.h')
+        target = join(get_scons_pkg_build_dir(config.name), 
+                      'include/numpy/numpyconfig.h')
         incl_dir = os.path.dirname(target)
         if incl_dir not in config.numpy_include_dirs:
             config.numpy_include_dirs.append(incl_dir)
@@ -61,8 +63,8 @@
         # XXX: I really have to think about how to communicate path info
         # between scons and distutils, and set the options at one single
         # location.
-        h_file = join(scons_build_dir, local_dir, '__multiarray_api.h')
-        t_file = join(scons_build_dir, local_dir, 'multiarray_api.txt')
+        h_file = join(get_scons_pkg_build_dir(config.name), '__multiarray_api.h')
+        t_file = join(get_scons_pkg_build_dir(config.name), 'multiarray_api.txt')
         config.add_data_files((header_dir, h_file),
                               (header_dir, t_file))
 
@@ -71,8 +73,8 @@
         # XXX: I really have to think about how to communicate path info
         # between scons and distutils, and set the options at one single
         # location.
-        h_file = join(scons_build_dir, local_dir, '__ufunc_api.h')
-        t_file = join(scons_build_dir, local_dir, 'ufunc_api.txt')
+        h_file = join(get_scons_pkg_build_dir(config.name), '__ufunc_api.h')
+        t_file = join(get_scons_pkg_build_dir(config.name), 'ufunc_api.txt')
         config.add_data_files((header_dir, h_file),
                               (header_dir, t_file))
 



More information about the Numpy-svn mailing list