Let's make imports simple

This commit is contained in:
Justine Tunney 2021-08-17 00:05:58 -07:00
parent 3d0347e26e
commit 214e3a68a9
5 changed files with 21 additions and 189 deletions

View file

@ -529,23 +529,23 @@ def main():
This function is called automatically when this module is imported,
unless the python interpreter was started with the -S flag.
"""
global ENABLE_USER_SITE
# global ENABLE_USER_SITE
abs_paths()
known_paths = removeduppaths()
known_paths = venv(known_paths)
if ENABLE_USER_SITE is None:
ENABLE_USER_SITE = check_enableusersite()
known_paths = addusersitepackages(known_paths)
known_paths = addsitepackages(known_paths)
setquit()
setcopyright()
sethelper()
if not sys.flags.isolated:
enablerlcompleter()
execsitecustomize()
if ENABLE_USER_SITE:
execusercustomize()
# abs_paths()
# known_paths = removeduppaths()
# known_paths = venv(known_paths)
# if ENABLE_USER_SITE is None:
# ENABLE_USER_SITE = check_enableusersite()
# known_paths = addusersitepackages(known_paths)
# known_paths = addsitepackages(known_paths)
# setquit()
# setcopyright()
# sethelper()
# if not sys.flags.isolated:
# enablerlcompleter()
# execsitecustomize()
# if ENABLE_USER_SITE:
# execusercustomize()
# Prevent extending of sys.path when python was started with -S and
# site is imported later.