GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Stop calculating the location of `_sysconfigdata` for the WASI build script · Issue #144533 · python/cpython

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

New issue
Copy link
New issue
Copy link
Closed
Closed
Stop calculating the location of _sysconfigdata for the WASI build script#144533
Copy link
Labels
3.15bugs and security fixesbugs and security fixesOS-wasibuildThe build process and cross-buildThe build process and cross-buildeasy

Description

@brettcannon
brettcannon
opened on Feb 6, 2026
Issue body actions

cpython/Platforms/WASI/__main__.py

Line 328 in 957f9fe

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

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

Linked PRs

  • gh-144533: Use pybuilddir.txt to find _sysconfigdata for WASI #144535
  • GH-144533: Use wasmtime's --argv0 to auto-discover sysconfig in WASI builds #145328

Activity

  1. brettcannon
    added
    buildThe build process and cross-buildThe build process and cross-build
    easy
    3.15bugs and security fixesbugs and security fixes
    on Feb 6, 2026
  2. therohityadav
    added 4 commits that reference this issue on Feb 6, 2026

    pythongh-144533: Use pybuilddir.txt to find _sysconfigdata for WASI

    5e55826

    pythongh-144533: Use pybuilddir.txt to find _sysconfigdata for WASI

    035c77e

    pythongh-144533: Use pybuilddir.txt to find _sysconfigdata for WASI

    b64935a

    pythongh-144533: Use pybuilddir.txt to find _sysconfigdata for WASI

    0ecc19e
  3. brettcannon
    added
    OS-wasi
    on Feb 12, 2026
  4. brettcannon commented on Feb 20, 2026

    @brettcannon
    brettcannon
    on Feb 20, 2026
    MemberAuthor
    More actions

    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.

    Reacted by Jaime Andrés Gómez de Luna
  5. brettcannon
    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
  6. brettcannon commented on Feb 20, 2026

    @brettcannon
    brettcannon
    on Feb 20, 2026
    MemberAuthor
    More actions

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

  7. savannahostrowski
    added a commit that references this issue on Feb 28, 2026

    GH-144533: Use wasmtime's --argv0 to auto-discover sysconfig in WASI …

    180d58c
  8. savannahostrowski
    closed this as completedon Feb 28, 2026
  9. brijkapadia
    added a commit that references this issue on Feb 28, 2026

    pythonGH-144533: Use wasmtime's --argv0 to auto-discover sysconfig in…

    4560c85
  10. ljfp
    added a commit that references this issue on Apr 25, 2026

    pythonGH-144533: Use wasmtime's --argv0 to auto-discover sysconfig in…

    9f4be16
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.15bugs and security fixesbugs and security fixesOS-wasibuildThe build process and cross-buildThe build process and cross-buildeasy

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.