Skip to content

Commit

Permalink
Don't restore sys.platform in venv.py (#108)
Browse files Browse the repository at this point in the history
This is buggy when combined with pip 25. The commit when it was added
mentions it was needed for `test_oot_build` to pass, but it seems to
pass now.

Tested downstream:
pyodide/pyodide#5455
  • Loading branch information
hoodmane authored Feb 23, 2025
1 parent 5673226 commit c957cbe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

### Fixed

- Fixed Pyodide venv `sys_platform` marker evaluation with pip >= 25.
[#108](https://github.com/pyodide/pyodide-build/pull/108)

## [0.29.3] - 2025/02/04

### Added
Expand Down
2 changes: 0 additions & 2 deletions pyodide_build/out_of_tree/venv.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ def platform_tags():
f"""
os_name, sys_platform, platform_system, multiarch, host_platform = {platform_data}
os.name = os_name
orig_platform = sys.platform
sys.platform = sys_platform
sys.platlibdir = "lib"
sys.implementation._multiarch = multiarch
Expand All @@ -153,7 +152,6 @@ def platform_tags():
import sysconfig
sysconfig._init_config_vars()
del os.environ["_PYTHON_SYSCONFIGDATA_NAME"]
sys.platform = orig_platform
"""
)

Expand Down

0 comments on commit c957cbe

Please # to comment.