diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2022-06-09 16:12:51 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-09 16:12:51 (GMT) |
commit | 4c41f2115303c180a4438c8bedec9d7db1d54cb5 (patch) | |
tree | feb3680aaca7ac2034c049e9be567b1123dd9afa | |
parent | 2084f9479c4e78e29cc68634e945ef0fbcd5bc0d (diff) | |
download | cpython-4c41f2115303c180a4438c8bedec9d7db1d54cb5.zip cpython-4c41f2115303c180a4438c8bedec9d7db1d54cb5.tar.gz cpython-4c41f2115303c180a4438c8bedec9d7db1d54cb5.tar.bz2 |
gh-90473: disable user site packages on WASI/Emscripten (GH-93633)
(cherry picked from commit 5a4af3ab030a3f3e708ee83d7d4ca3cb2d5b7360)
Co-authored-by: Christian Heimes <christian@python.org>
-rw-r--r-- | Lib/site.py | 4 | ||||
-rw-r--r-- | Lib/sysconfig.py | 4 | ||||
-rw-r--r-- | Misc/NEWS.d/next/Library/2022-06-09-10-12-55.gh-issue-90473.683m_C.rst | 2 |
3 files changed, 6 insertions, 4 deletions
diff --git a/Lib/site.py b/Lib/site.py index b11cd48..69670d9 100644 --- a/Lib/site.py +++ b/Lib/site.py @@ -266,8 +266,8 @@ def _getuserbase(): if env_base: return env_base - # VxWorks has no home directories - if sys.platform == "vxworks": + # Emscripten, VxWorks, and WASI have no home directories + if sys.platform in {"emscripten", "vxworks", "wasi"}: return None def joinuser(*args): diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py index e21b730..bf926cf 100644 --- a/Lib/sysconfig.py +++ b/Lib/sysconfig.py @@ -111,8 +111,8 @@ def _getuserbase(): if env_base: return env_base - # VxWorks has no home directories - if sys.platform == "vxworks": + # Emscripten, VxWorks, and WASI have no home directories + if sys.platform in {"emscripten", "vxworks", "wasi"}: return None def joinuser(*args): diff --git a/Misc/NEWS.d/next/Library/2022-06-09-10-12-55.gh-issue-90473.683m_C.rst b/Misc/NEWS.d/next/Library/2022-06-09-10-12-55.gh-issue-90473.683m_C.rst new file mode 100644 index 0000000..b053a8e --- /dev/null +++ b/Misc/NEWS.d/next/Library/2022-06-09-10-12-55.gh-issue-90473.683m_C.rst @@ -0,0 +1,2 @@ +Emscripten and WASI have no home directory and cannot provide :pep:`370` +user site directory. |