Skip to content

Commit

Permalink
pythongh-90473: disable user site packages on WASI/Emscripten (python…
Browse files Browse the repository at this point in the history
  • Loading branch information
tiran authored Jun 9, 2022
1 parent e974b3e commit 5a4af3a
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 5a4af3a

Please sign in to comment.