[issue14057] Speedup sysconfig startup

STINNER Victor report at bugs.python.org
Mon Feb 20 00:48:54 CET 2012


STINNER Victor <victor.stinner at gmail.com> added the comment:

To speed up python -s, the following patch avoids loading the sysconfig module:

diff --git a/Lib/site.py b/Lib/site.py
--- a/Lib/site.py
+++ b/Lib/site.py
@@ -518,7 +518,8 @@ def main():
     known_paths = removeduppaths()
     if ENABLE_USER_SITE is None:
         ENABLE_USER_SITE = check_enableusersite()
-    known_paths = addusersitepackages(known_paths)
+    if ENABLE_USER_SITE:
+        known_paths = addusersitepackages(known_paths)
     known_paths = addsitepackages(known_paths)
     if sys.platform == 'os2emx':
         setBEGINLIBPATH()

I don't know if this patch is correct.

----------
nosy: +eric.araujo, tarek

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14057>
_______________________________________


More information about the Python-bugs-list mailing list