[pypy-svn] r54748 - in pypy/dist/pypy/translator/tool: . test

antocuni at codespeak.net antocuni at codespeak.net
Thu May 15 13:55:08 CEST 2008


Author: antocuni
Date: Thu May 15 13:55:06 2008
New Revision: 54748

Modified:
   pypy/dist/pypy/translator/tool/cbuild.py
   pypy/dist/pypy/translator/tool/test/test_cbuild.py
Log:
revert r54745, as it breaks translation on linux



Modified: pypy/dist/pypy/translator/tool/cbuild.py
==============================================================================
--- pypy/dist/pypy/translator/tool/cbuild.py	(original)
+++ pypy/dist/pypy/translator/tool/cbuild.py	Thu May 15 13:55:06 2008
@@ -317,8 +317,7 @@
                         cmdobj = build_shared_library(dist)
                         cmdobj.inplace = True
                         cmdobj.force = True
-                        if (sys.platform == 'win32'
-                            and sys.executable.lower().endswith('_d.exe')):
+                        if sys.platform == 'win32' and sys.executable.endswith('_d.exe'):
                             cmdobj.debug = True
                         dist.command_obj["build_ext"] = cmdobj
                         dist.have_run["build_ext"] = 0
@@ -480,10 +479,8 @@
                         linker_exe linker_so'''.split():
                 compiler.executables[c][0] = self.compiler_exe
         compiler.spawn = log_spawned_cmd(compiler.spawn)
-        self.eci = self.eci.convert_sources_to_files()
-        filenames = self.cfilenames + list(self.eci.separate_module_files)
         objects = []
-        for cfile in filenames:
+        for cfile in self.cfilenames: 
             cfile = py.path.local(cfile)
             old = cfile.dirpath().chdir() 
             try: 

Modified: pypy/dist/pypy/translator/tool/test/test_cbuild.py
==============================================================================
--- pypy/dist/pypy/translator/tool/test/test_cbuild.py	(original)
+++ pypy/dist/pypy/translator/tool/test/test_cbuild.py	Thu May 15 13:55:06 2008
@@ -45,12 +45,9 @@
         {
             printf("%f\\n", pow(2.0, 2.0));
         }''')
-        if sys.platform != 'win32':
-            eci = ExternalCompilationInfo(
-                libraries = ['m'],
-                )
-        else:
-            eci = ExternalCompilationInfo()
+        eci = ExternalCompilationInfo(
+            libraries = ['m'],
+        )
         output = build_executable([c_file], eci)
         p = Popen(output, stdout=PIPE, stderr=STDOUT)
         p.wait()
@@ -112,8 +109,7 @@
             int get()
             {
                 return 42;
-            }'''],
-            export_symbols = ['get']
+            }''']
         )
         neweci = eci.compile_shared_lib()
         assert len(neweci.libraries) == 1



More information about the Pypy-commit mailing list