Skip to content

Stop calculating the location of _sysconfigdata for the WASI build script #144533

Description

@brettcannon

f"{wasi_build_dir}/build/lib.wasi-wasm32-{python_version}"

That should be reading the directory location from pybuilddir.txt instead.

Linked PRs

Activity

  1. added
    buildThe build process and cross-build
    3.15pre-release feature fixes, bugs and security fixes
    on Feb 6, 2026
  2. added 4 commits that reference this issue on Feb 6, 2026
  3. brettcannon commented on Feb 20, 2026

    @brettcannon
    MemberAuthor

    For posterity, I figured out why this approach was initially taken. The _sysconfigdata module is found via getpath.py which bases it on the location of the source checkout and pybuilddir.txt. Unfortunately, to get imports to work from a checkout we mount the checkout to / in the WASI guest which makes the checkout location recorded via ./configure be incorrect. As such, we need to use PYTHONPATH to manually include the build directory that pybuilddir.txt points at. And since we need to set PYTHONPATH for the host runner when we call ./configure so it ends up in Makefile, we need to calculate the path to the build directory instead of getting to use pybuilddir.txt.

  4. changed the title [-]Use `pybuilddir.txt` to find `_sysconfigdata` for the WASI build script[/-] [+]Stop calculating the location of `_sysconfigdata` for the WASI build script[/+] on Feb 20, 2026
  5. brettcannon commented on Feb 20, 2026

    @brettcannon
    MemberAuthor

    And Savannah has a better solution outlined in #144535 (comment) .

  6. added a commit that references this issue on Feb 28, 2026
  7. added a commit that references this issue on Feb 28, 2026
  8. added a commit that references this issue on Apr 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.15pre-release feature fixes, bugs and security fixesOS-wasibuildThe build process and cross-buildeasy

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions