From f81c8e8b692053d2e2563c4c49a94977a1297f16 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Thu, 9 Jun 2022 17:45:29 +0200 Subject: [PATCH] gh-90473: disable user site packages on WASI/Emscripten (GH-93633) (cherry picked from commit 5a4af3ab030a3f3e708ee83d7d4ca3cb2d5b7360) Co-authored-by: Christian Heimes --- Lib/site.py | 4 ++-- Lib/sysconfig.py | 4 ++-- .../Library/2022-06-09-10-12-55.gh-issue-90473.683m_C.rst | 2 ++ 3 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 Misc/NEWS.d/next/Library/2022-06-09-10-12-55.gh-issue-90473.683m_C.rst diff --git a/Lib/site.py b/Lib/site.py index b11cd48e69e9a8..69670d9d7f2230 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 e21b7303fecc6b..bf926cf76807b7 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 00000000000000..b053a8e9a08135 --- /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. pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy