Repository navigation
fix: run ui-web page assembly on the project's pinned Python - #599
Merged
Merged
Conversation
build-ui assembled the served page with a bare `python3`, which resolves to whatever interpreter is first on PATH. On a stock macOS that is 3.9, where Path.write_text(newline=...) does not exist, so the documented `make build-ui` recipe died with a TypeError at ui-web/build.py line 198 after the vite build had already succeeded. pyproject requires-python is >=3.12 and every other Makefile target already runs its Python through uv; build-ui was the one caller that bypassed the pinned interpreter. Run the script through `uv run --frozen --python $(PYTHON_VERSION)`, matching install.sh, which already documents why the page assembly takes its Python from uv. Verified: reproduced the TypeError with Python 3.9.13 (exit 1); with uv + Python 3.12.7 the exact command builds dist/index.html, the artifact is byte-identical to the pre-change output on 3.12 (sha256 a1068871929266cfe746b5f321eb7faed2158785c8b19d4984783099b4c23181), check-page.mjs and the other page gates pass, and the artifact carries zero CR bytes. ui-web/build.py itself is untouched: its newline="" write needs 3.10+, but that half of the fix sits under the ui-web freeze and stays for maintainers.
Author
|
Hi — first contribution here: a one-line fix so the ui-web page assembly runs on the project's pinned Python instead of whatever is first on PATH. The |
gloryfromca
approved these changes
Sep 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
make build-uiassembled the served page with a barepython3, whichresolves to whatever interpreter is first on PATH. On a stock macOS
(no Command Line Tools ahead of
/usr/bin/python3= 3.9.6) thedocumented self-hosting recipe
make install-deps && make build-uidied after the vite build had already succeeded:
Path.write_text(newline=...)exists from Python 3.10, while pyprojectrequires-pythonis>=3.12and every other Makefile target alreadyruns its Python through uv.
build-uiwas the one caller that bypassedthe pinned interpreter.
Change
One line in the Makefile: run the script through
uv run --frozen --python $(PYTHON_VERSION) python ui-web/build.py,the same form
install.shalready uses for this script (and alreadydocuments the rationale for). No source, test, or dependency changes.
ui-web/build.pyitself is untouched: itsnewline=""write needs3.10+, but that half of the fix sits under the ui-web freeze, so this PR
takes the Makefile half only, as the issue suggests.
CI keeps its bare
python3(the ubuntu runners provide a working onethrough setup-python / the runner image); this PR changes the documented
local path only.
Verification
Reproduced the failure with Python 3.9.13 (the stock-macOS analogue):
Then ran the changed target's commands in order, on Windows with
uv 0.12.17 and Python 3.12.7:
Artifact checks:
Repo gates on this commit:
Based on main at 87f3928.
Closes #526
AI disclosure: this PR was drafted with AI assistance (ZCode agent,
model step-5-preview); the reproduction, commands, and results above
were produced by it. The diff is one line; please review before merging.