Skip to content

Use staged Python for embuilder - #1924

Merged
akoeplinger merged 2 commits into
dotnet:mainfrom
mmitche:use-staged-python-for-embuilder
Oct 4, 2026
Merged

akoeplinger merged 2 commits into
dotnet:mainfrom
mmitche:use-staged-python-for-embuilder

Conversation

@mmitche

@mmitche mmitche commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

Summary

Pass EMSDK_PYTHON=$(PythonPath) to both embuilder tasks so the existing Emscripten launchers select the staged Python runtime on macOS and Windows, and python3 on Linux.

Motivation

The macOS VMR vertical build selected Xcode Python 3.9.6, while the current Emscripten sources require Python 3.10 or newer. The packaged Python was already staged, but the embuilder tasks did not pass EMSDK_PYTHON. Running emsdk activate in a separate Exec does not propagate its environment to later tasks.

Keep the wrappers rather than invoking embuilder.py directly: they ignore Python environment overrides with -E, clear _PYTHON_SYSCONFIGDATA_NAME, and preserve Windows UTF-8 handling and platform workarounds.

Failing build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=1620784&view=logs&j=5551d7c4-237a-5520-de91-e8efe1228738

Validation

  • Validated eng/emsdk.proj as XML and asserted both embuilder tasks keep their wrappers and pass EMSDK_PYTHON.
  • Ran git diff --check.
  • Full package build not run. Full CI validation is still needed.

mmitche and others added 2 commits October 2, 2026 15:43
Invoke embuilder.py with the Python runtime already provided by the Emscripten transport package instead of relying on the agent's python3 resolution.

Co-authored-by: Copilot <[email protected]>
Set EMSDK_PYTHON instead of bypassing the launchers, preserving Python environment isolation and platform workarounds.

Co-authored-by: Copilot <[email protected]>
Copilot-Session: 91d767a0-610e-452b-b78f-9679dfcc5d58
@akoeplinger
akoeplinger marked this pull request as ready for review October 4, 2026 09:03
@akoeplinger akoeplinger changed the title Use staged Python for embuilder Use staged Python for embuilder and emsdk activation Oct 4, 2026
@akoeplinger
akoeplinger force-pushed the use-staged-python-for-embuilder branch from 34d2a31 to 7d813db Compare October 4, 2026 09:17
@akoeplinger akoeplinger changed the title Use staged Python for embuilder and emsdk activation Use staged Python for embuilder Oct 4, 2026
@akoeplinger
akoeplinger merged commit dd278bf into dotnet:main Oct 4, 2026
10 checks passed
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 12.0-preview1 milestone Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants