Skip to content

Conversation

HoKim98
Copy link
Contributor

@HoKim98 HoKim98 commented Sep 24, 2025

Hello, this PR just adds a missing build-details.json build step on WASM ecosystems (e.g. WASI).

When cross-compiling for WASI by build_wasm or build_emscripten, the build-details.json step is now included in the build process, just like with native builds.

This fixes the libinstall task which requires the build-details.json file during the process.

Signed-off-by: Ho Kim <ho.kim@ulagbulag.io>
@bedevere-app
Copy link

bedevere-app bot commented Sep 24, 2025

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@python-cla-bot
Copy link

python-cla-bot bot commented Sep 24, 2025

All commit authors signed the Contributor License Agreement.

CLA signed

@HoKim98 HoKim98 changed the title Add missing build-details.json step for building wasm gh-139302: Add missing build-details.json step for building wasm Sep 24, 2025
@picnixz picnixz changed the title gh-139302: Add missing build-details.json step for building wasm gh-138489: Add missing build-details.json step for building wasm Sep 24, 2025
@HoKim98 HoKim98 marked this pull request as ready for review September 24, 2025 14:03
@AA-Turner AA-Turner requested review from Copilot and FFY00 September 24, 2025 14:10
@AA-Turner
Copy link
Member

Sorry, it's far too easy to click the 'copilot' button, this was absolutely not my intent!

A

@python python deleted a comment from Copilot AI Sep 24, 2025
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
@HoKim98 HoKim98 force-pushed the fix/wasm-build-details.json branch from f9a947b to 6bbad6d Compare September 24, 2025 14:14
Copilot

This comment was marked as spam.

@emmatyping
Copy link
Member

Confirmed locally this also fixes #137878

$ wasmtime --dir /opt/wasi-python/ /opt/wasi-python/bin/python3.wasm
Python 3.15.0a0 (heads/fix/wasm-build-details.json-dirty:6bbad6d6cc2, Sep 24 2025, 10:33:33) [Clang 19.1.5-wasi-sdk (https://github.com/llvm/llvm-project ab4b5a2db582958af1e on wasi
Type "help", "copyright", "credits" or "license" for more information.
warning: can't use pyrepl: No module named 'termios'
>>> import math
>>> math.pi
3.141592653589793

Copy link
Member

@emmatyping emmatyping left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! This looks good to me.

Copy link
Member

@FFY00 FFY00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @HoKim98 😊

@FFY00 FFY00 merged commit db53ca3 into python:main Oct 4, 2025
45 checks passed
@AA-Turner AA-Turner added the needs backport to 3.14 bugs and security fixes label Oct 4, 2025
@miss-islington-app
Copy link

Thanks @HoKim98 for the PR, and @FFY00 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 4, 2025
…asm (pythonGH-139302)

* fix: add missing `build-details.json` step for building wasm

Signed-off-by: Ho Kim <ho.kim@ulagbulag.io>

* pythongh-138489: Add missing build-details.json step for building wasm

Signed-off-by: Ho Kim <ho.kim@ulagbulag.io>

* Update Makefile.pre.in

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>

---------
(cherry picked from commit db53ca3)

Co-authored-by: Ho Kim <ho.kim@ulagbulag.io>
Signed-off-by: Ho Kim <ho.kim@ulagbulag.io>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
@bedevere-app
Copy link

bedevere-app bot commented Oct 4, 2025

GH-139557 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label Oct 4, 2025
@AA-Turner
Copy link
Member

I think it's worth backporting this, but it's not critical that this goes into 3.14.0. What do we think?

A

@FFY00 FFY00 added the needs backport to 3.14 bugs and security fixes label Oct 4, 2025
@miss-islington-app

This comment was marked as outdated.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 4, 2025
…asm (pythonGH-139302)

* fix: add missing `build-details.json` step for building wasm

Signed-off-by: Ho Kim <ho.kim@ulagbulag.io>

* pythongh-138489: Add missing build-details.json step for building wasm

Signed-off-by: Ho Kim <ho.kim@ulagbulag.io>

* Update Makefile.pre.in

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>

---------
(cherry picked from commit db53ca3)

Co-authored-by: Ho Kim <ho.kim@ulagbulag.io>
Signed-off-by: Ho Kim <ho.kim@ulagbulag.io>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
@miss-islington-app

This comment was marked as outdated.

@AA-Turner
Copy link
Member

Backport PR already created at GH-139557, miss-islington doesn't appear to recognise this.

A

danigm pushed a commit to openSUSE-Python/cpython that referenced this pull request Oct 7, 2025
…asm (python#139302)

* fix: add missing `build-details.json` step for building wasm

Signed-off-by: Ho Kim <ho.kim@ulagbulag.io>

* pythongh-138489: Add missing build-details.json step for building wasm

Signed-off-by: Ho Kim <ho.kim@ulagbulag.io>

* Update Makefile.pre.in

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>

---------

Signed-off-by: Ho Kim <ho.kim@ulagbulag.io>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
encukou pushed a commit that referenced this pull request Oct 7, 2025
…wasm (GH-139302) (GH-139557)

(cherry picked from commit db53ca3)

Signed-off-by: Ho Kim <ho.kim@ulagbulag.io>
Co-authored-by: Ho Kim <ho.kim@ulagbulag.io>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs backport to 3.14 bugs and security fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants