Author: Armin Rigo <[email protected]>
Branch: 
Changeset: r78506:c8bcecbc4a8e
Date: 2015-07-09 12:35 +0100
http://bitbucket.org/pypy/pypy/changeset/c8bcecbc4a8e/

Log:    Only do the final "Create cffi bindings for modules" step if the
        _cffi_backend module is enabled. It is not, for example, with
        --sandbox translations, which hang when used in this way.

diff --git a/pypy/goal/targetpypystandalone.py 
b/pypy/goal/targetpypystandalone.py
--- a/pypy/goal/targetpypystandalone.py
+++ b/pypy/goal/targetpypystandalone.py
@@ -297,7 +297,12 @@
         options = make_dict(config)
         wrapstr = 'space.wrap(%r)' % (options)
         pypy.module.sys.Module.interpleveldefs['pypy_translation_info'] = 
wrapstr
+        if config.objspace.usemodules._cffi_backend:
+            self.hack_for_cffi_modules(driver)
 
+        return self.get_entry_point(config)
+    
+    def hack_for_cffi_modules(self, driver):
         # HACKHACKHACK
         # ugly hack to modify target goal from compile_c to build_cffi_imports
         # this should probably get cleaned up and merged with driver.create_exe
@@ -336,8 +341,6 @@
         driver.default_goal = 'build_cffi_imports'
         # HACKHACKHACK end
 
-        return self.get_entry_point(config)
-
     def jitpolicy(self, driver):
         from pypy.module.pypyjit.policy import PyPyJitPolicy
         from pypy.module.pypyjit.hooks import pypy_hooks
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to