[pypy-svn] r74356 - pypy/trunk/pypy/module/cpyext

afa at codespeak.net afa at codespeak.net
Tue May 4 14:04:20 CEST 2010


Author: afa
Date: Tue May  4 14:04:18 2010
New Revision: 74356

Modified:
   pypy/trunk/pypy/module/cpyext/presetup.py
Log:
- on Windows, distutils uses the _winreg module
- no need to call build_bridge() twice


Modified: pypy/trunk/pypy/module/cpyext/presetup.py
==============================================================================
--- pypy/trunk/pypy/module/cpyext/presetup.py	(original)
+++ pypy/trunk/pypy/module/cpyext/presetup.py	Tue May  4 14:04:18 2010
@@ -4,7 +4,7 @@
 
 Run python <this file> setup.py build in your project directory
 
-You can import resulting .so with py.py --allworingmodules
+You can import resulting .so with py.py --allworkingmodules
 """
 
 import sys, os
@@ -21,8 +21,10 @@
 
 from pypy.conftest import gettestobjspace
 from pypy.module.cpyext.api import build_bridge
-space = gettestobjspace(usemodules=['cpyext', 'thread'])
-build_bridge(space)
+usemodules = ['cpyext', 'thread']
+if sys.platform == 'win32':
+    usemodules.append('_winreg') # necessary in distutils
+space = gettestobjspace(usemodules=usemodules)
 
 inc_paths = str(udir)
 



More information about the Pypy-commit mailing list