Skip to content

Commit

Permalink
gh-90473: disable user site packages on WASI/Emscripten (GH-93633)
Browse files Browse the repository at this point in the history
(cherry picked from commit 5a4af3a)

Co-authored-by: Christian Heimes <[email protected]>
  • Loading branch information
miss-islington and tiran authored Jun 9, 2022
1 parent 2084f94 commit 4c41f21
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Lib/site.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
4 changes: 2 additions & 2 deletions Lib/sysconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Emscripten and WASI have no home directory and cannot provide :pep:`370`
user site directory.

0 comments on commit 4c41f21

Please sign in to comment.