Skip to content

Derive Python paths from $PYTHON_REF instead of hard-coding - #110

Merged
pashagolub merged 1 commit into
masterfrom
fix/local-python-path
Oct 8, 2026
Merged

pashagolub merged 1 commit into
masterfrom
fix/local-python-path

Conversation

@pashagolub

@pashagolub pashagolub commented Sep 9, 2026 •

Copy link
Copy Markdown
Collaborator

$PYTHON_REF pins 3.14.4 but the local-builder branch of Update-PythonAndPIP still pointed at %ProgramFiles%\Python313. On a machine that has no 3.13 the build dies; worse, on a machine that does (they are not uncommon, this was the previous pinned version) the build silently uses the stale 3.13 interpreter to download wheels, then ships a 3.14 installer alongside them. The offline pip install --no-index on the target then finds only cp313 wheels and fails.

Get-PythonVersion parses the version out of $PYTHON_REF and everything version-dependent is derived from it. After the installer runs, both python.exe and pip3.exe are asserted to exist, and the interpreter actually in use is checked against the pinned major.minor -- which turns the 'one should change python version in github action workflows when changed here' comment into an enforced invariant rather than a note.

@pashagolub pashagolub self-assigned this Sep 9, 2026
@pashagolub pashagolub added the bug Something isn't working label Sep 9, 2026
$PYTHON_REF pins 3.14.4 but the local-builder branch of Update-PythonAndPIP
still pointed at %ProgramFiles%\Python313. On a machine that has no 3.13 the
build dies; worse, on a machine that does (they are not uncommon, this was
the previous pinned version) the build silently uses the stale 3.13
interpreter to download wheels, then ships a 3.14 installer alongside them.
The offline 'pip install --no-index' on the target then finds only cp313
wheels and fails.

Get-PythonVersion parses the version out of $PYTHON_REF and everything
version-dependent is derived from it. After the installer runs, both
python.exe and pip3.exe are asserted to exist, and the interpreter actually
in use is checked against the pinned major.minor -- which turns the
'one should change python version in github action workflows when changed
here' comment into an enforced invariant rather than a note.
@pashagolub
pashagolub force-pushed the fix/local-python-path branch 2 times, most recently from a9d5703 to 0054c7b Compare October 7, 2026 18:43
@pashagolub pashagolub changed the title Derive Python paths from $PYTHON_REF instead of hard-coding Derive Python paths from $PYTHON_REF instead of hard-coding Oct 7, 2026
@pashagolub
pashagolub merged commit 729abff into master Oct 8, 2026
3 checks passed
@pashagolub
pashagolub deleted the fix/local-python-path branch October 8, 2026 15:20
pashagolub added a commit that referenced this pull request Oct 8, 2026
#110 derived the Python install paths from $PYTHON_REF and put the version in
the download log line; this branch routes that same download through
Get-VerifiedFile. Kept both: the version-aware message and the hash-verified
download.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants