Skip to content

Commit

Permalink
Monkey-patch platform.machine for pip in pyodide venv (pyodide#4412)
Browse files Browse the repository at this point in the history
Without this fix, `pip install sqlalchemy>=2` fails trying to install greenlet.
  • Loading branch information
hoodmane authored Jan 24, 2024
1 parent 231b0de commit 595f6b5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pyodide-build/pyodide_build/out_of_tree/venv.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ def get_executable():
sys.platform = sys_platform
sys.implementation._multiarch = multiarch
platform.system = lambda: sys_platform
platform.machine = lambda: "wasm32"
os.environ["_PYTHON_HOST_PLATFORM"] = host_platform
os.environ["_PYTHON_SYSCONFIGDATA_NAME"] = f'_sysconfigdata_{{sys.abiflags}}_{{sys.platform}}_{{sys.implementation._multiarch}}'
sys.path.append("{sysconfigdata_dir}")
Expand Down

0 comments on commit 595f6b5

Please sign in to comment.