Author: Amaury Forgeot d'Arc <amaur...@gmail.com> Branch: Changeset: r44681:e422a0ec46e0 Date: 2011-06-04 00:54 +0200 http://bitbucket.org/pypy/pypy/changeset/e422a0ec46e0/
Log: Some modules do import other extension modules before their Py_InitModule (pygame is one of them) diff --git a/pypy/module/cpyext/api.py b/pypy/module/cpyext/api.py --- a/pypy/module/cpyext/api.py +++ b/pypy/module/cpyext/api.py @@ -966,6 +966,7 @@ state = space.fromcache(State) if state.find_extension(name, path) is not None: return + old_context = state.package_context state.package_context = name, path try: from pypy.rlib import rdynload @@ -991,7 +992,7 @@ generic_cpy_call(space, initfunc) state.check_and_raise_exception() finally: - state.package_context = None, None + state.package_context = old_context state.fixup_extension(name, path) @specialize.ll() _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit