[Scipy-svn] r3540 - in branches/scipy.scons: . scipy/special/amos scipy/weave

scipy-svn at scipy.org scipy-svn at scipy.org
Thu Nov 15 01:48:37 EST 2007


Author: cdavid
Date: 2007-11-15 00:48:24 -0600 (Thu, 15 Nov 2007)
New Revision: 3540

Modified:
   branches/scipy.scons/
   branches/scipy.scons/scipy/special/amos/setup.py
   branches/scipy.scons/scipy/weave/ext_tools.py
   branches/scipy.scons/scipy/weave/inline_tools.py
Log:
Merged revisions 3535-3539 via svnmerge from 
http://svn.scipy.org/svn/scipy/trunk

........
  r3538 | jarrod.millman | 2007-11-14 13:14:24 +0900 (Wed, 14 Nov 2007) | 2 lines
  
  braino
........
  r3539 | jarrod.millman | 2007-11-14 13:21:13 +0900 (Wed, 14 Nov 2007) | 2 lines
  
  applying patch from Fernando P., which corrects my braino and more
........



Property changes on: branches/scipy.scons
___________________________________________________________________
Name: svnmerge-integrated
   - /trunk:1-3534
   + /trunk:1-3539

Modified: branches/scipy.scons/scipy/special/amos/setup.py
===================================================================
--- branches/scipy.scons/scipy/special/amos/setup.py	2007-11-14 04:21:13 UTC (rev 3539)
+++ branches/scipy.scons/scipy/special/amos/setup.py	2007-11-15 06:48:24 UTC (rev 3540)
@@ -18,14 +18,14 @@
     def __init__(self):
         self.compiler_name = 'g77'
     def to_object(self,dirty_files):
-        files = dirty_files.join()
+        files = " ".join(dirty_files)
         cmd = self.compiler_name + ' -c ' + files
         print cmd
         failure = os.system(cmd)
         if failure:
             raise ValueError, 'failure during compile'
     def object_to_library(self,library_name,object_files):
-        objects = object_files.join()
+        objects = " ".join(object_files)
         cmd = 'ar -cr lib%s.a %s' % (library_name,objects)
         print cmd
         os.system(cmd)

Modified: branches/scipy.scons/scipy/weave/ext_tools.py
===================================================================
--- branches/scipy.scons/scipy/weave/ext_tools.py	2007-11-14 04:21:13 UTC (rev 3539)
+++ branches/scipy.scons/scipy/weave/ext_tools.py	2007-11-15 06:48:24 UTC (rev 3540)
@@ -45,14 +45,14 @@
                          'int exception_occured = 0;\n' \
                          'PyObject *py_local_dict = NULL;\n'
         arg_string_list = self.arg_specs.variable_as_strings() + ['"local_dict"']
-        arg_strings = arg_string_list.join(',')
+        arg_strings = ','.join(arg_string_list)
         if arg_strings: arg_strings += ','
         declare_kwlist = 'static char *kwlist[] = {%s NULL};\n' % arg_strings
 
-        py_objects = self.arg_specs.py_pointers().join(', ')
-        init_flags = self.arg_specs.init_flags().join(', ')
-        init_flags_init = self.arg_specs.init_flags().join('= ')
-        py_vars = self.arg_specs.py_variables().join(' = ')
+        py_objects = ', '.join(self.arg_specs.py_pointers())
+        init_flags = ', '.join(self.arg_specs.init_flags())
+        init_flags_init = '= '.join(self.arg_specs.init_flags())
+        py_vars = ' = '.join(self.arg_specs.py_variables())
         if py_objects:
             declare_py_objects  = 'PyObject ' + py_objects +';\n'
             declare_py_objects += 'int '+ init_flags + ';\n'
@@ -66,7 +66,7 @@
         #cnt = len(arg_list)
         #declare_cleanup = "blitz::TinyVector<PyObject*,%d> clean_up(0);\n" % cnt
 
-        ref_string = self.arg_specs.py_references().join(', ')
+        ref_string = ', '.join(self.arg_specs.py_references())
         if ref_string:
             ref_string += ', &py_local_dict'
         else:
@@ -85,7 +85,7 @@
         for arg in self.arg_specs:
             arg_strings.append(arg.declaration_code())
             arg_strings.append(arg.init_flag() +" = 1;\n")
-        code = arg_strings.join("")
+        code = "".join(arg_strings)
         return code
 
     def arg_cleanup_code(self):
@@ -97,14 +97,14 @@
             code +=     indent(arg.cleanup_code(),4)
             code += "}\n"
             arg_strings.append(code)
-        code = arg_strings.join("")
+        code = "".join(arg_strings)
         return code
 
     def arg_local_dict_code(self):
         arg_strings = []
         for arg in self.arg_specs:
             arg_strings.append(arg.local_dict_code())
-        code = arg_strings.join("")
+        code = "".join(arg_strings)
         return code
 
     def function_code(self):

Modified: branches/scipy.scons/scipy/weave/inline_tools.py
===================================================================
--- branches/scipy.scons/scipy/weave/inline_tools.py	2007-11-14 04:21:13 UTC (rev 3539)
+++ branches/scipy.scons/scipy/weave/inline_tools.py	2007-11-15 06:48:24 UTC (rev 3540)
@@ -57,27 +57,21 @@
                  init_values + parse_tuple
 
     def arg_declaration_code(self):
-        arg_strings = []
-        for arg in self.arg_specs:
-            arg_strings.append(arg.declaration_code(inline=1))
-        code = arg_strings.join("")
-        return code
+        """Return the declaration code as a string."""
+        arg_strings = [arg.declaration_code(inline=1)
+                       for arg in self.arg_specs]
+        return "".join(arg_strings)
 
     def arg_cleanup_code(self):
-        arg_strings = []
-        for arg in self.arg_specs:
-            arg_strings.append(arg.cleanup_code())
-        code = arg_strings.join("")
-        return code
+        """Return the cleanup code as a string."""
+        arg_strings = [arg.cleanup_code() for arg in self.arg_specs]
+        return "".join(arg_strings)
 
     def arg_local_dict_code(self):
-        arg_strings = []
-        for arg in self.arg_specs:
-            arg_strings.append(arg.local_dict_code())
-        code = arg_strings.join("")
-        return code
+        """Return the code to create the local dict as a string."""
+        arg_strings = [arg.local_dict_code() for arg in self.arg_specs]
+        return "".join(arg_strings)
 
-
     def function_code(self):
         from ext_tools import indent
         decl_code = indent(self.arg_declaration_code(),4)




More information about the Scipy-svn mailing list