[pypy-svn] r48985 - pypy/branch/remove-extcompiler-rctypes/pypy/translator/tool

pedronis at codespeak.net pedronis at codespeak.net
Fri Nov 23 13:13:54 CET 2007


Author: pedronis
Date: Fri Nov 23 13:13:53 2007
New Revision: 48985

Modified:
   pypy/branch/remove-extcompiler-rctypes/pypy/translator/tool/cbuild.py
Log:
have a so_ext constant that specify the platform dll file extension



Modified: pypy/branch/remove-extcompiler-rctypes/pypy/translator/tool/cbuild.py
==============================================================================
--- pypy/branch/remove-extcompiler-rctypes/pypy/translator/tool/cbuild.py	(original)
+++ pypy/branch/remove-extcompiler-rctypes/pypy/translator/tool/cbuild.py	Fri Nov 23 13:13:53 2007
@@ -11,6 +11,11 @@
 
 debug = 0
 
+if sys.platform == 'win32':
+    so_ext = '.dll'
+else:
+    so_ext = '.so'
+
 def compiler_command():
     # e.g. for tcc, you might set this to
     #    "tcc -shared -o %s.so %s.c"
@@ -158,7 +163,7 @@
     modname = str(cache_dir.join(modname))
     compile_c_module(cfiles, modname, include_dirs=include_dirs,
                      libraries=libraries)
-    return modname + '.so'
+    return modname + so_ext
 
 def make_module_from_c(cfile, include_dirs=None, libraries=[]):
     cfile = py.path.local(cfile)



More information about the Pypy-commit mailing list