[pypy-svn] r56393 - in pypy/dist/pypy/translator: llvm tool

haypo at codespeak.net haypo at codespeak.net
Wed Jul 9 15:42:23 CEST 2008


Author: haypo
Date: Wed Jul  9 15:42:22 2008
New Revision: 56393

Modified:
   pypy/dist/pypy/translator/llvm/buildllvm.py
   pypy/dist/pypy/translator/tool/cbuild.py
Log:
Remove trailing spaces


Modified: pypy/dist/pypy/translator/llvm/buildllvm.py
==============================================================================
--- pypy/dist/pypy/translator/llvm/buildllvm.py	(original)
+++ pypy/dist/pypy/translator/llvm/buildllvm.py	Wed Jul  9 15:42:22 2008
@@ -12,7 +12,7 @@
 def llvm_is_on_path():
     if py.path.local.sysfind("llvm-as") is None or \
        py.path.local.sysfind("llvm-gcc") is None:
-        return False 
+        return False
     return True
 
 def exe_version(exe, cache={}):
@@ -40,7 +40,7 @@
 def have_boehm():
     import distutils.sysconfig
     from os.path import exists
-    libdir = distutils.sysconfig.EXEC_PREFIX + "/lib"  
+    libdir = distutils.sysconfig.EXEC_PREFIX + "/lib"
     return exists(libdir + '/libgc.so') or exists(libdir + '/libgc.a')
 
 def postfix():
@@ -89,7 +89,7 @@
             model = ''
             if not standalone:
                 model = ' -relocation-model=pic'
-                
+
             self.cmds.append("llc %s %s.bc -f -o %s.s" % (model, base, base))
             self.cmds.append("as %s.s -o %s.o" % (base, base))
 
@@ -106,7 +106,7 @@
             self.cmds.append("gcc %s -c %s -O3 -o %s" % (filename, include_opts, objname))
 
         attrs = self.genllvm.eci._copy_attributes()
-        attrs['libraries'] = tuple(libraries) + attrs['libraries'] 
+        attrs['libraries'] = tuple(libraries) + attrs['libraries']
         self.genllvm.eci = ExternalCompilationInfo(**attrs)
 
 # XXX support profile?
@@ -134,7 +134,7 @@
         self.dirpath.chdir()
 
         return self.genllvm.entry_name
- 
+
     def setup_linker_command(self, base, exename=None):
         eci = self.genllvm.eci
         library_files = self.genllvm.db.gcpolicy.gc_libraries()

Modified: pypy/dist/pypy/translator/tool/cbuild.py
==============================================================================
--- pypy/dist/pypy/translator/tool/cbuild.py	(original)
+++ pypy/dist/pypy/translator/tool/cbuild.py	Wed Jul  9 15:42:22 2008
@@ -450,7 +450,7 @@
 class ProfOpt(object):
     #XXX assuming gcc style flags for now
     name = "profopt"
-    
+
     def __init__(self, compiler):
         self.compiler = compiler
 
@@ -490,7 +490,7 @@
         self.include_dirs = list(eci.include_dirs)
         self.library_dirs = list(eci.library_dirs)
         self.compile_extra = list(eci.compile_extra)
-        self.link_extra = list(eci.link_extra) 
+        self.link_extra = list(eci.link_extra)
         self.frameworks = list(eci.frameworks)
         self.compiler_exe = compiler_exe
         self.profbased = profbased
@@ -518,7 +518,7 @@
 
         if outputfilename is None:
             self.outputfilename = py.path.local(cfilenames[0]).new(ext=ext)
-        else: 
+        else:
             self.outputfilename = py.path.local(outputfilename)
         self.eci = eci
 
@@ -565,9 +565,9 @@
             if not noerr:
                 print >>sys.stderr, data
             raise
- 
+
     def _build(self):
-        from distutils.ccompiler import new_compiler 
+        from distutils.ccompiler import new_compiler
         compiler = new_compiler(force=1)
         if self.compiler_exe is not None:
             for c in '''compiler compiler_so compiler_cxx
@@ -575,7 +575,7 @@
                 compiler.executables[c][0] = self.compiler_exe
         compiler.spawn = log_spawned_cmd(compiler.spawn)
         objects = []
-        for cfile in self.cfilenames: 
+        for cfile in self.cfilenames:
             cfile = py.path.local(cfile)
             compile_extra = self.compile_extra[:]
             # -frandom-seed is only to try to be as reproducable as possible
@@ -587,17 +587,17 @@
                     compile_extra = [arg for arg in compile_extra
                                      if not arg.startswith('-fprofile-')]
 
-            old = cfile.dirpath().chdir() 
-            try: 
-                res = compiler.compile([cfile.basename], 
+            old = cfile.dirpath().chdir()
+            try:
+                res = compiler.compile([cfile.basename],
                                        include_dirs=self.eci.include_dirs,
                                        extra_preargs=compile_extra)
                 assert len(res) == 1
-                cobjfile = py.path.local(res[0]) 
+                cobjfile = py.path.local(res[0])
                 assert cobjfile.check()
                 objects.append(str(cobjfile))
-            finally: 
-                old.chdir() 
+            finally:
+                old.chdir()
 
         compiler.link_executable(objects, str(self.outputfilename),
                                  libraries=self.eci.libraries,



More information about the Pypy-commit mailing list