[Numpy-svn] r8081 - trunk/numpy/distutils

numpy-svn@scip... numpy-svn@scip...
Fri Jan 29 16:50:54 CST 2010


Author: rkern
Date: 2010-01-29 16:50:54 -0600 (Fri, 29 Jan 2010)
New Revision: 8081

Modified:
   trunk/numpy/distutils/misc_util.py
Log:
BUG: Add more protection against uninitialized lists on the Distribution object.

Modified: trunk/numpy/distutils/misc_util.py
===================================================================
--- trunk/numpy/distutils/misc_util.py	2010-01-29 22:18:04 UTC (rev 8080)
+++ trunk/numpy/distutils/misc_util.py	2010-01-29 22:50:54 UTC (rev 8081)
@@ -1275,6 +1275,8 @@
         include_dirs = self.paths(paths)
         dist = self.get_distribution()
         if dist is not None:
+            if dist.include_dirs is None:
+                dist.include_dirs = []
             dist.include_dirs.extend(include_dirs)
         else:
             self.include_dirs.extend(include_dirs)
@@ -1311,6 +1313,8 @@
                 [headers.append((path[0],p)) for p in self.paths(path[1])]
         dist = self.get_distribution()
         if dist is not None:
+            if dist.headers is None:
+                dist.headers = []
             dist.headers.extend(headers)
         else:
             self.headers.extend(headers)
@@ -1655,6 +1659,8 @@
                                pre_hook, post_hook,
                                full_source_files, package_path)
         if dist is not None:
+            if dist.scons_data is None:
+                dist.scons_data = []
             dist.scons_data.append(scons_info)
             self.warn('distutils distribution has been initialized,'\
                       ' it may be too late to add a subpackage '+ subpackage_name)



More information about the Numpy-svn mailing list