Kaydet (Commit) 2e4e0117 authored tarafından INADA Naoki's avatar INADA Naoki Kaydeden (comit) GitHub

bpo-29592: site: skip abs_paths() when it's redundant (GH-167)

Call abs_paths() only if removeduppaths() changed sys.path
üst aa289a59
......@@ -522,8 +522,13 @@ def main():
"""
global ENABLE_USER_SITE
abs_paths()
orig_path = sys.path[:]
known_paths = removeduppaths()
if orig_path != sys.path:
# removeduppaths() might make sys.path absolute.
# fix __file__ and __cached__ of already imported modules too.
abs_paths()
known_paths = venv(known_paths)
if ENABLE_USER_SITE is None:
ENABLE_USER_SITE = check_enableusersite()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment