mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-09 06:02:28 +00:00
Let's make imports simple
This commit is contained in:
parent
3d0347e26e
commit
214e3a68a9
5 changed files with 21 additions and 189 deletions
32
third_party/python/Lib/site.py
vendored
32
third_party/python/Lib/site.py
vendored
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue