[Numpy-svn] r4157 - in branches/numpy.scons: . numpy/distutils/command

numpy-svn@scip... numpy-svn@scip...
Tue Oct 9 04:43:16 CDT 2007


Author: cdavid
Date: 2007-10-09 04:43:05 -0500 (Tue, 09 Oct 2007)
New Revision: 4157

Modified:
   branches/numpy.scons/
   branches/numpy.scons/numpy/distutils/command/scons.py
Log:
Do not print debug info when no sconscripts are used


Property changes on: branches/numpy.scons
___________________________________________________________________
Name: bzr:revision-info
   - timestamp: 2007-09-26 17:53:29.147000074 +0900
committer: David Cournapeau <david@ar.media.kyoto-u.ac.jp>
properties: 
	branch-nick: numpy.scons

   + timestamp: 2007-10-09 17:49:06.331000090 +0900
committer: David Cournapeau <david@ar.media.kyoto-u.ac.jp>
properties: 
	branch-nick: numpy.scons

Name: bzr:revision-id:v3-trunk0
   - 3737 david@david-laptop-20070920080908-n8pj8vmszdir3zoa
3738 david@david-laptop-20070920081509-58kkojgmml3t7jxs
3739 david@david-laptop-20070920081910-phlk1ujthksgpm0z
3740 david@david-laptop-20070920082641-bdhrt6eafeoli50i
3741 david@ar.media.kyoto-u.ac.jp-20070920130730-satdeppbh1k0bq2p
3743 david@ar.media.kyoto-u.ac.jp-20070921073742-vpv8pwv0j8fbd93m
3744 david@david-laptop-20070922101656-61kfi2faucemr2rl
3745 david@david-laptop-20070922113708-ror18thshang1cpu
3747 david@david-laptop-20070922140534-n9xsl096tjrzmct1
3749 david@david-laptop-20070922154007-usit009fr6vp377j
3750 david@david-laptop-20070923070011-leu2ozc2fy1q5cht
3751 david@david-laptop-20070924015925-dhsiao40jp7zsfp9
3752 david@ar.media.kyoto-u.ac.jp-20070924070657-nbw23j0ayan30cli
3753 david@ar.media.kyoto-u.ac.jp-20070924082918-i1lc1zikywi8czj4
3754 david@ar.media.kyoto-u.ac.jp-20070924083008-c0edtt8zs31yeh1q
3755 david@ar.media.kyoto-u.ac.jp-20070924112351-pnnho638cohz6lj1
3756 david@david-laptop-20070924153247-yftud00bynilxv69
3757 david@david-laptop-20070924163545-pish34x9fq2h66aj
3758 david@david-laptop-20070924164633-iiyygcaw81ji3n34
3759 david@david-laptop-20070924170201-y14v2yzikdpvamfp
3760 david@david-laptop-20070924171208-5bmitorzf49d1aa2
3761 david@david-laptop-20070925014444-ns9v90gotnxt39mq
3769 david@david-laptop-20070925145952-4osi81tvch7v6luj
3773 david@ar.media.kyoto-u.ac.jp-20070926073429-2kdc6yf1o210aer0
3774 david@ar.media.kyoto-u.ac.jp-20070926084356-938djoytjap90rmo
3775 david@ar.media.kyoto-u.ac.jp-20070926085329-3gquq3gu2k8rgzb0

   + 3737 david@david-laptop-20070920080908-n8pj8vmszdir3zoa
3738 david@david-laptop-20070920081509-58kkojgmml3t7jxs
3739 david@david-laptop-20070920081910-phlk1ujthksgpm0z
3740 david@david-laptop-20070920082641-bdhrt6eafeoli50i
3741 david@ar.media.kyoto-u.ac.jp-20070920130730-satdeppbh1k0bq2p
3743 david@ar.media.kyoto-u.ac.jp-20070921073742-vpv8pwv0j8fbd93m
3744 david@david-laptop-20070922101656-61kfi2faucemr2rl
3745 david@david-laptop-20070922113708-ror18thshang1cpu
3747 david@david-laptop-20070922140534-n9xsl096tjrzmct1
3749 david@david-laptop-20070922154007-usit009fr6vp377j
3750 david@david-laptop-20070923070011-leu2ozc2fy1q5cht
3751 david@david-laptop-20070924015925-dhsiao40jp7zsfp9
3752 david@ar.media.kyoto-u.ac.jp-20070924070657-nbw23j0ayan30cli
3753 david@ar.media.kyoto-u.ac.jp-20070924082918-i1lc1zikywi8czj4
3754 david@ar.media.kyoto-u.ac.jp-20070924083008-c0edtt8zs31yeh1q
3755 david@ar.media.kyoto-u.ac.jp-20070924112351-pnnho638cohz6lj1
3756 david@david-laptop-20070924153247-yftud00bynilxv69
3757 david@david-laptop-20070924163545-pish34x9fq2h66aj
3758 david@david-laptop-20070924164633-iiyygcaw81ji3n34
3759 david@david-laptop-20070924170201-y14v2yzikdpvamfp
3760 david@david-laptop-20070924171208-5bmitorzf49d1aa2
3761 david@david-laptop-20070925014444-ns9v90gotnxt39mq
3769 david@david-laptop-20070925145952-4osi81tvch7v6luj
3773 david@ar.media.kyoto-u.ac.jp-20070926073429-2kdc6yf1o210aer0
3774 david@ar.media.kyoto-u.ac.jp-20070926084356-938djoytjap90rmo
3775 david@ar.media.kyoto-u.ac.jp-20070926085329-3gquq3gu2k8rgzb0
3776 david@ar.media.kyoto-u.ac.jp-20071009084906-9kradhwpu7su633x


Modified: branches/numpy.scons/numpy/distutils/command/scons.py
===================================================================
--- branches/numpy.scons/numpy/distutils/command/scons.py	2007-10-09 03:08:26 UTC (rev 4156)
+++ branches/numpy.scons/numpy/distutils/command/scons.py	2007-10-09 09:43:05 UTC (rev 4157)
@@ -46,12 +46,14 @@
 
 def get_compiler_executable(compiler):
     """For any give CCompiler instance, this gives us the name of C compiler
-    (the actual executable."""
+    (the actual executable)."""
     # Geez, why does distutils has no common way to get the compiler name...
     if compiler.compiler_type == 'msvc':
         # this is harcoded in distutils... A bit cleaner way would be to
         # initialize the compiler instance and then get compiler.cc, but this
         # may be costly: we really just want a string.
+        # XXX: we need to initialize the compiler anyway, so do not use
+        # hardcoded string
         #compiler.initialize()
         #print compiler.cc
         return 'cl.exe' 
@@ -76,6 +78,9 @@
     return '"' + path + '"'
 
 class scons(old_build_ext):
+    # XXX: I really do not like the way distutils add attributes "on the fly".
+    # We should eally avoid that and remove all the code which does it before
+    # release.
     description = "Scons builder"
     #user_options = []
     user_options = [('fcompiler=', None, "specify the Fortran compiler type"),
@@ -90,6 +95,8 @@
         if self.distribution.has_scons_scripts():
             print "Got it: scons scripts are %s" % self.distribution.scons_scripts
             self.scons_scripts = self.distribution.scons_scripts
+        else:
+            self.scons_scripts = []
 
         # Try to get the same compiler than the ones used by distutils: this is
         # non trivial because distutils and scons have totally different
@@ -111,16 +118,18 @@
         if hasattr(self.compiler, 'initialize'):
             self.compiler.initialize()
 		
-        #print "++++++++++++++++++++++++++++++++++++++++"
-        #print "self.compiler is %s, this gives us scons tool %s" % (compiler_type, 
-        #                                                 dist2sconscc(self.compiler))
-        #print get_tool_path(self.compiler)
-        #print "++++++++++++++++++++++++++++++++++++++++"
+        # XXX: debug, remove
+        if self.scons_scripts:
+            #print "++++++++++++++++++++++++++++++++++++++++"
+            #print "self.compiler is %s, this gives us scons tool %s" % (compiler_type, 
+            #                                                 dist2sconscc(self.compiler))
+            #print get_tool_path(self.compiler)
+            #print "++++++++++++++++++++++++++++++++++++++++"
 
-        print "++++++++++++++++++++++++++++++++++++++++"
-        print get_scons_local_path()
-        print get_python_exec_invoc()
-        print "++++++++++++++++++++++++++++++++++++++++"
+            print "++++++++++++++++++++++++++++++++++++++++"
+            print get_scons_local_path()
+            print get_python_exec_invoc()
+            print "++++++++++++++++++++++++++++++++++++++++"
 
     def run(self):
         # XXX: when a scons script is missing, scons only prints warnings, and



More information about the Numpy-svn mailing list