← Back to team overview

instant team mailing list archive

Another bug in instant...

 

Hello,

Any extra_compile_args that are handed to distutils can't include any 
whitespaces before the argument, neither can it be an empt string.

This is now corrected so instant want pass such arguments to distutils if it 
gets any.

Johan
# HG changeset patch
# User "Johan Hake <hake@xxxxxxxxx>"
# Date 1218104237 -7200
# Node ID 82c729dfeb6ff0aa6b8f7b09d0773d9f11c0a0a9
# Parent  86736bf0e8fef78f2deaa98997320901e73f379e
Fixed a bug in passing cppargs and lddargs to instant.

diff -r 86736bf0e8fe -r 82c729dfeb6f src/instant.py
--- a/src/instant.py	Thu Aug 07 10:40:31 2008 +0200
+++ b/src/instant.py	Thu Aug 07 12:17:17 2008 +0200
@@ -190,16 +190,22 @@
                 self.library_dirs = dict[key]
             elif key == 'cppargs':
                 assert isinstance(dict[key], (str,tuple, list)), "Wrong type of argument to cppargs" 
-                if isinstance(dict[key], str): 
-                    self.cppargs = [dict[key]]
-                elif isinstance(dict[key], (tuple, list)): 
-                    self.cppargs = dict[key]
+                if isinstance(dict[key], str):
+                    if dict[key] is "":
+                        self.cppargs = []
+                    else:
+                        self.cppargs = [dict[key].strip()]
+                elif isinstance(dict[key], (tuple, list)):
+                    self.cppargs = [s.strip() for s in dict[key]] 
             elif key == 'lddargs':
                 assert isinstance(dict[key], (str,tuple, list)), "Wrong type of argument to lddargs" 
                 if isinstance(dict[key], str): 
-                    self.lddargs = [dict[key]]
-                elif isinstance(dict[key], (tuple, list)): 
-                    self.lddargs = dict[key]
+                    if dict[key] is "":
+                        self.lddargs = []
+                    else:
+                        self.lddargs = [dict[key].strip()]
+                elif isinstance(dict[key], (tuple, list)):
+                    self.lddargs = [s.strip() for s in dict[key]] 
             elif key == 'object_files':
                 self.object_files = dict[key]
             elif key == 'arrays':