[pypy-svn] r75551 - in pypy/release/1.3.x: . pypy/module/cpyext pypy/module/sys pypy/tool/release pypy/tool/release/test

fijal at codespeak.net fijal at codespeak.net
Thu Jun 24 06:16:22 CEST 2010


Author: fijal
Date: Thu Jun 24 06:16:17 2010
New Revision: 75551

Modified:
   pypy/release/1.3.x/   (props changed)
   pypy/release/1.3.x/pypy/module/cpyext/api.py
   pypy/release/1.3.x/pypy/module/sys/__init__.py
   pypy/release/1.3.x/pypy/module/sys/interp_encoding.py
   pypy/release/1.3.x/pypy/tool/release/package.py   (props changed)
   pypy/release/1.3.x/pypy/tool/release/test/test_package.py   (props changed)
Log:
Merge 75549 and 75547 from trunk


Modified: pypy/release/1.3.x/pypy/module/cpyext/api.py
==============================================================================
--- pypy/release/1.3.x/pypy/module/cpyext/api.py	(original)
+++ pypy/release/1.3.x/pypy/module/cpyext/api.py	Thu Jun 24 06:16:17 2010
@@ -808,7 +808,6 @@
         kwds["includes"] = ['Python.h'] # this is our Python.h
 
     # Generate definitions for global structures
-    struct_file = udir.join('pypy_structs.c')
     structs = ["#include <Python.h>"]
     for name, (typ, expr) in GLOBALS.iteritems():
         if name.endswith('#'):
@@ -818,7 +817,7 @@
             structs.append('PyObject* %s = (PyObject*)&_%s;' % (name, name))
         elif typ == 'PyDateTime_CAPI*':
             structs.append('%s %s = NULL;' % (typ, name))
-    struct_file.write('\n'.join(structs))
+    struct_source = '\n'.join(structs)
 
     eci = ExternalCompilationInfo(
         include_dirs=include_dirs,
@@ -832,9 +831,8 @@
                                source_dir / "bufferobject.c",
                                source_dir / "object.c",
                                source_dir / "cobject.c",
-                               struct_file,
                                ],
-        separate_module_sources = [code],
+        separate_module_sources = [code, struct_source],
         export_symbols=export_symbols_eci,
         compile_extra=compile_extra,
         **kwds

Modified: pypy/release/1.3.x/pypy/module/sys/__init__.py
==============================================================================
--- pypy/release/1.3.x/pypy/module/sys/__init__.py	(original)
+++ pypy/release/1.3.x/pypy/module/sys/__init__.py	Thu Jun 24 06:16:17 2010
@@ -96,11 +96,8 @@
         if space.config.translating and not we_are_translated():
             # don't get the filesystemencoding at translation time
             assert self.filesystemencoding is None
-        else:
-            from pypy.module.sys.interp_encoding import _getfilesystemencoding
-            self.filesystemencoding = _getfilesystemencoding(space)
 
-    def getmodule(self, name): 
+    def getmodule(self, name):
         space = self.space
         w_modules = self.get('modules') 
         try: 

Modified: pypy/release/1.3.x/pypy/module/sys/interp_encoding.py
==============================================================================
--- pypy/release/1.3.x/pypy/module/sys/interp_encoding.py	(original)
+++ pypy/release/1.3.x/pypy/module/sys/interp_encoding.py	Thu Jun 24 06:16:17 2010
@@ -55,4 +55,6 @@
     """Return the encoding used to convert Unicode filenames in
     operating system filenames.
     """
+    if space.sys.filesystemencoding is None:
+        space.sys.filesystemencoding = _getfilesystemencoding(space)
     return space.wrap(space.sys.filesystemencoding)



More information about the Pypy-commit mailing list