diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2019-08-07 18:07:43 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-07 18:07:43 (GMT) |
commit | eab76c3c75a572566862200728cc8d05b3298f12 (patch) | |
tree | 6756741f9b67698e11d3541b4a9ab1eb4fe00ff3 /PC | |
parent | 1a3a40c1cb582e436d568009fae2b06c0b1978ed (diff) | |
download | cpython-eab76c3c75a572566862200728cc8d05b3298f12.zip cpython-eab76c3c75a572566862200728cc8d05b3298f12.tar.gz cpython-eab76c3c75a572566862200728cc8d05b3298f12.tar.bz2 |
bpo-37734: Fix use of registry values to launch Python from Microsoft Store app (GH-15146)
(cherry picked from commit 1fab9cbfbaf19a7bc79cef382136fcf9491e3183)
Co-authored-by: Steve Dower <steve.dower@python.org>
Diffstat (limited to 'PC')
-rw-r--r-- | PC/layout/main.py | 10 | ||||
-rw-r--r-- | PC/layout/support/appxmanifest.py | 14 |
2 files changed, 15 insertions, 9 deletions
diff --git a/PC/layout/main.py b/PC/layout/main.py index fe934bf..07b7e6d 100644 --- a/PC/layout/main.py +++ b/PC/layout/main.py @@ -153,9 +153,15 @@ def get_layout(ns): yield "libs/" + n + ".lib", lib if ns.include_appxmanifest: + yield from in_build("python_uwp.exe", new_name="python{}".format(VER_DOT)) + yield from in_build("pythonw_uwp.exe", new_name="pythonw{}".format(VER_DOT)) + # For backwards compatibility, but we don't reference these ourselves. yield from in_build("python_uwp.exe", new_name="python") yield from in_build("pythonw_uwp.exe", new_name="pythonw") else: + yield from in_build("python.exe", new_name="python{}".format(VER_DOT)) + yield from in_build("pythonw.exe", new_name="pythonw{}".format(VER_DOT)) + # For backwards compatibility, but we don't reference these ourselves. yield from in_build("python.exe", new_name="python") yield from in_build("pythonw.exe", new_name="pythonw") @@ -163,9 +169,9 @@ def get_layout(ns): if ns.include_launchers and ns.include_appxmanifest: if ns.include_pip: - yield from in_build("python_uwp.exe", new_name="pip") + yield from in_build("python_uwp.exe", new_name="pip{}".format(VER_DOT)) if ns.include_idle: - yield from in_build("pythonw_uwp.exe", new_name="idle") + yield from in_build("pythonw_uwp.exe", new_name="idle{}".format(VER_DOT)) if ns.include_stable: yield from in_build(PYTHON_STABLE_DLL_NAME) diff --git a/PC/layout/support/appxmanifest.py b/PC/layout/support/appxmanifest.py index 58fba84..0a0f1fc 100644 --- a/PC/layout/support/appxmanifest.py +++ b/PC/layout/support/appxmanifest.py @@ -154,9 +154,9 @@ REGISTRY = { "SysVersion": VER_DOT, "Version": "{}.{}.{}".format(VER_MAJOR, VER_MINOR, VER_MICRO), "InstallPath": { - "": "[{AppVPackageRoot}]", - "ExecutablePath": "[{AppVPackageRoot}]\\python.exe", - "WindowedExecutablePath": "[{AppVPackageRoot}]\\pythonw.exe", + "": "[{{AppVPackageRoot}}]", + "ExecutablePath": "[{{AppVPackageRoot}}]\\python{}.exe".format(VER_DOT), + "WindowedExecutablePath": "[{{AppVPackageRoot}}]\\pythonw{}.exe".format(VER_DOT), }, "Help": { "Main Python Documentation": { @@ -395,7 +395,7 @@ def get_appxmanifest(ns): ns, xml, "Python", - "python", + "python{}".format(VER_DOT), ["python", "python{}".format(VER_MAJOR), "python{}".format(VER_DOT)], PYTHON_VE_DATA, "console", @@ -406,7 +406,7 @@ def get_appxmanifest(ns): ns, xml, "PythonW", - "pythonw", + "pythonw{}".format(VER_DOT), ["pythonw", "pythonw{}".format(VER_MAJOR), "pythonw{}".format(VER_DOT)], PYTHONW_VE_DATA, "windows", @@ -418,7 +418,7 @@ def get_appxmanifest(ns): ns, xml, "Pip", - "pip", + "pip{}".format(VER_DOT), ["pip", "pip{}".format(VER_MAJOR), "pip{}".format(VER_DOT)], PIP_VE_DATA, "console", @@ -430,7 +430,7 @@ def get_appxmanifest(ns): ns, xml, "Idle", - "idle", + "idle{}".format(VER_DOT), ["idle", "idle{}".format(VER_MAJOR), "idle{}".format(VER_DOT)], IDLE_VE_DATA, "windows", |