[Numpy-svn] r4101 - in trunk/numpy/distutils: . command

numpy-svn@scip... numpy-svn@scip...
Sun Sep 23 08:56:58 CDT 2007


Author: pearu
Date: 2007-09-23 08:56:50 -0500 (Sun, 23 Sep 2007)
New Revision: 4101

Modified:
   trunk/numpy/distutils/__init__.py
   trunk/numpy/distutils/ccompiler.py
   trunk/numpy/distutils/command/build_ext.py
Log:
fixing link error: fixed. Removing debug messages and added a warning message on the situation that triggered this issue: numpy.distutils must always be imported before distutils.

Modified: trunk/numpy/distutils/__init__.py
===================================================================
--- trunk/numpy/distutils/__init__.py	2007-09-23 13:39:22 UTC (rev 4100)
+++ trunk/numpy/distutils/__init__.py	2007-09-23 13:56:50 UTC (rev 4101)
@@ -1,5 +1,22 @@
 
 from __version__ import version as __version__
+
+# Check that distutils has not been imported before.
+import sys
+if 'distutils' in sys.modules:
+    sys.stderr.write('''\
+********************************************************
+WARNING!WARNING!WARNING!WARNING!WARNING!WARNING!WARNING!
+
+distutils has been imported before numpy.distutils
+and now numpy.distutils cannot apply all of its
+customizations to distutils effectively.
+
+To avoid this warning, make sure that numpy.distutils
+is imported *before* distutils.
+********************************************************
+''')
+
 # Must import local ccompiler ASAP in order to get
 # customized CCompiler.spawn effective.
 import ccompiler

Modified: trunk/numpy/distutils/ccompiler.py
===================================================================
--- trunk/numpy/distutils/ccompiler.py	2007-09-23 13:39:22 UTC (rev 4100)
+++ trunk/numpy/distutils/ccompiler.py	2007-09-23 13:56:50 UTC (rev 4101)
@@ -381,7 +381,6 @@
             lib_opts.extend(list(i))
         else:
             lib_opts.append(i)
-    log.info('DEBUG:'+`lib_opts, library_dirs, runtime_library_dirs`)
     return lib_opts
 ccompiler.gen_lib_options = gen_lib_options
 

Modified: trunk/numpy/distutils/command/build_ext.py
===================================================================
--- trunk/numpy/distutils/command/build_ext.py	2007-09-23 13:39:22 UTC (rev 4100)
+++ trunk/numpy/distutils/command/build_ext.py	2007-09-23 13:56:50 UTC (rev 4101)
@@ -390,8 +390,6 @@
         else:
             kws = {}
 
-        log.debug('DEBUG: linker=%s,library_dirs=%s,ext.runtime_library_dirs=%s' % (linker, library_dirs, ext.runtime_library_dirs))
-
         linker(objects, ext_filename,
                libraries=libraries,
                library_dirs=library_dirs,



More information about the Numpy-svn mailing list