Repository navigation
feat: register Windows installs with the Python launcher - #50
Merged
Merged
Conversation
linghengqian
force-pushed
the
feat/27-pep514-registration
branch
from
November 13, 2026 02:15
35b1087 to
ffca6f4
Compare
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.
Summary
Adds opt-in PEP 514 registration for Windows Python installations, so
py.exeand the Python install manager can discover Pythons installed by vfox. This implements the non-controversial part of #27: registration under vfox's own company key, without writingPythonCoreor changing whatpy -3.12selects.What changed
VFOX_PYTHON_REGISTER_PY_LAUNCHER=1to register each Windows install underHKCU\Software\Python\VersionFox\<tag>.DisplayName,SysVersion,SysArchitecture,InstallPath,ExecutablePath,WindowedExecutablePathand a privateVfoxManagedmarker, following PEP 514.3.12.10), with-32/-arm64for non-default architectures and the existingtsuffix for free-threaded builds. Multiple patch versions can coexist.PreUninstallremoves an entry only when it is marked as vfox-managed and still points at the version being removed; it also removes an emptyVersionFoxcompany key.docs/windows-launcher.md, the platform pages, the development hook contract, and plugin notes.Why not
PythonCorePythonCoreis reserved for python.org's CPython. A per-userPythonCore\<major.minor>entry would shadow an existing official installation, cannot represent multiple patch versions, and is whatpy -3.12selects by design. This PR deliberately does not take over that identity.py -3.12remains PythonCore-only; vfox-installed Pythons are selected withpy -V:VersionFox/3.12or the exact tag.Tests
tests/pep514_test.luacovers opt-in parsing, tag and architecture handling, generated PowerShell, uv-build nested install prefixes, ownership checks, and failure warnings.vfox plugin test .discovers it automatically, so it runs on both the Linux and Windows plugin-test jobs. It stubsos.executeandio.open, so it never writes the registry.stylua --check .passes, and the license check passes.Refs #27.