Bug 1751028 - Fix randomized sys.path order when using system Python packages r=mhentges

Differential Revision: https://phabricator.services.mozilla.com/D136880
This commit is contained in:
Nicklas Boman 2022-01-25 17:19:54 +00:00
parent 0cd6159fd9
commit f25c8b740a

View File

@ -822,10 +822,8 @@ class ExternalPythonSite:
self.python_path,
"-c",
"import sys; import site; "
"print("
" set(sys.path)"
" - set([site.getusersitepackages()] + site.getsitepackages())"
")",
"site_packages = [site.getusersitepackages()] + site.getsitepackages(); "
"print([path for path in sys.path if path not in site_packages])",
],
# The "site" module may return erroneous entries for the system python
# if the "VIRTUAL_ENV" environment variable is set.