Skip to content

feat(userland): set PYTHONHOME so Python finds its stdlib - #148

Merged
FlareCoding merged 2 commits into
masterfrom
pr/python-pythonhome
Aug 4, 2026
Merged

feat(userland): set PYTHONHOME so Python finds its stdlib#148
FlareCoding merged 2 commits into
masterfrom
pr/python-pythonhome

Conversation

@FlareCoding

Copy link
Copy Markdown
Owner

Summary

  • Python could not import its shipped standard library because getpath's landmark search failed to locate the install prefix, leaving /usr/lib/python3.12 off sys.path.
  • init now exports PYTHONHOME=/usr, Python's designed mechanism for a fixed install location, so every interpreter resolves its stdlib deterministically without relying on executable-path introspection.

Made with Cursor

Modules.Setup.local was staged into the build tree after configure ran, so
makesetup generated the module inittab without the static entries. The C
modules like math compiled but were never registered, so import math and
everything depending on it failed. Staging Setup.local before configure
records them in config.c.
@FlareCoding
FlareCoding merged commit e6bd357 into master Aug 4, 2026
14 checks passed
@FlareCoding
FlareCoding deleted the pr/python-pythonhome branch August 4, 2026 18:16
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.

1 participant