[pypy-commit] pypy app_main-refactor: we can't set sys.prefix, else we break the world

antocuni noreply at buildbot.pypy.org
Fri Jun 8 17:33:20 CEST 2012


Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: app_main-refactor
Changeset: r55514:06ca172f0769
Date: 2012-06-08 17:30 +0200
http://bitbucket.org/pypy/pypy/changeset/06ca172f0769/

Log:	we can't set sys.prefix, else we break the world

diff --git a/pypy/translator/goal/app_main.py b/pypy/translator/goal/app_main.py
--- a/pypy/translator/goal/app_main.py
+++ b/pypy/translator/goal/app_main.py
@@ -703,7 +703,9 @@
         path, prefix = find_stdlib(None, s)
         if path is None:
             return None
-        sys.prefix = sys.exec_prefix = prefix
+        # contrarily to the interp-level version, we don't set sys.prefix
+        # here, else CPythno stops to work (and e.g. test_proper_sys_path
+        # fails)
         return path
 
     # add an emulator for these pypy-only or 2.7-only functions


More information about the pypy-commit mailing list