fbt: exclude user site-packages directory from sys.path (#1778)

* fbt: exclude user site-packages directory from sys.path
* fbt: python path fixes for *nix
* fbt: fixed cli target on Windows

Co-authored-by: hedger <hedger@users.noreply.github.com>
This commit is contained in:
ghettorce
2022-09-24 14:30:19 +03:00
committed by GitHub
parent 6d2b0a3b6c
commit eadd7801af
5 changed files with 36 additions and 3 deletions

View File

@@ -12,7 +12,14 @@ forward_os_env = {
"PATH": os.environ["PATH"],
}
# Proxying CI environment to child processes & scripts
for env_value_name in ("WORKFLOW_BRANCH_OR_TAG", "DIST_SUFFIX", "HOME", "APPDATA"):
for env_value_name in (
"WORKFLOW_BRANCH_OR_TAG",
"DIST_SUFFIX",
"HOME",
"APPDATA",
"PYTHONHOME",
"PYTHONNOUSERSITE",
):
if environ_value := os.environ.get(env_value_name, None):
forward_os_env[env_value_name] = environ_value