[Python-checkins] bpo-47171: Enable installing the py.exe launcher on Windows ARM64 (GH-32203)

zooba webhook-mailer at python.org
Wed Mar 30 16:20:53 EDT 2022


https://github.com/python/cpython/commit/2ab609dd614045f3b112ede0b0883339de784f2a
commit: 2ab609dd614045f3b112ede0b0883339de784f2a
branch: main
author: Steve Dower <steve.dower at python.org>
committer: zooba <steve.dower at microsoft.com>
date: 2022-03-30T21:20:38+01:00
summary:

bpo-47171: Enable installing the py.exe launcher on Windows ARM64 (GH-32203)

files:
A Misc/NEWS.d/next/Windows/2022-03-30-19-55-00.bpo-47171.MbqCWn.rst
M Tools/msi/bundle/Default.ARM64.xsl
M Tools/msi/bundle/bundle.wxs
M Tools/msi/exe/exe.wixproj

diff --git a/Misc/NEWS.d/next/Windows/2022-03-30-19-55-00.bpo-47171.MbqCWn.rst b/Misc/NEWS.d/next/Windows/2022-03-30-19-55-00.bpo-47171.MbqCWn.rst
new file mode 100644
index 0000000000000..d9f1795f1e1f7
--- /dev/null
+++ b/Misc/NEWS.d/next/Windows/2022-03-30-19-55-00.bpo-47171.MbqCWn.rst
@@ -0,0 +1 @@
+Enables installing the :file:`py.exe` launcher on Windows ARM64.
diff --git a/Tools/msi/bundle/Default.ARM64.xsl b/Tools/msi/bundle/Default.ARM64.xsl
index f63da4e7274cb..b28b3f264adbc 100644
--- a/Tools/msi/bundle/Default.ARM64.xsl
+++ b/Tools/msi/bundle/Default.ARM64.xsl
@@ -10,6 +10,10 @@
         </xsl:copy>
     </xsl:template>
 
+    <!--
+    ** No longer need this change, but I'm leaving the snippets here as an example
+    ** in case we need to add another override in the future.
+
     <xsl:template match="*[local-name()='String' and @Id='InstallButtonNote']">
         <String Id="InstallButtonNote">[TargetDir]
 
@@ -20,4 +24,5 @@ Creates shortcuts but no file associations</String>
     <xsl:template match="*[local-name()='String' and @Id='Include_launcherHelp']">
         <String Id="Include_launcherHelp">(The 'py' launcher is currently unavailable on ARM64.)</String>
     </xsl:template>
+    -->
 </xsl:stylesheet>
\ No newline at end of file
diff --git a/Tools/msi/bundle/bundle.wxs b/Tools/msi/bundle/bundle.wxs
index ac4b7a6d75308..19e67faf887bc 100644
--- a/Tools/msi/bundle/bundle.wxs
+++ b/Tools/msi/bundle/bundle.wxs
@@ -56,9 +56,7 @@
     <Variable Name="DefaultCustomTargetDir" Value="" bal:Overridable="yes" />
 
     <Variable Name="InstallAllUsersState" Value="enabled" bal:Overridable="yes" />
-    <?if "$(var.Platform)"~="ARM64" ?>
-    <Variable Name="InstallLauncherAllUsersState" Value="hide" bal:Overridable="yes" />
-    <?elseif "$(var.PyTestExt)"="" ?>
+    <?if "$(var.PyTestExt)"="" ?>
     <Variable Name="InstallLauncherAllUsersState" Value="enabled" bal:Overridable="yes" />
     <?else ?>
     <Variable Name="InstallLauncherAllUsersState" Value="disable" bal:Overridable="yes" />
@@ -76,17 +74,12 @@
     <Variable Name="Include_tools" Value="1" bal:Overridable="yes" />
     <Variable Name="Include_tcltk" Value="1" bal:Overridable="yes" />
     <Variable Name="Include_pip" Value="1" bal:Overridable="yes" />
-    <?if $(var.Platform)~="ARM64" ?>
-    <Variable Name="Include_launcher" Value="0" bal:Overridable="yes" />
-    <Variable Name="Include_launcherState" Value="disable" />
-    <?else ?>
     <Variable Name="Include_launcher" Value="-1" bal:Overridable="yes" />
     <?if "$(var.PyTestExt)"="" ?>
     <Variable Name="Include_launcherState" Value="enabled" bal:Overridable="yes" />
     <?else ?>
     <Variable Name="Include_launcherState" Value="disable" />
     <?endif ?>
-    <?endif ?>
     <Variable Name="Include_symbols" Value="0" bal:Overridable="yes" />
     <Variable Name="Include_debug" Value="0" bal:Overridable="yes" />
 
@@ -115,9 +108,7 @@
       <PackageGroupRef Id="doc" />
       <PackageGroupRef Id="tools" />
       <PackageGroupRef Id="tcltk" />
-      <?if $(var.Platform)!="ARM64" ?>
       <PackageGroupRef Id="launcher" />
-      <?endif ?>
       <PackageGroupRef Id="pip" />
       <PackageGroupRef Id="packageinstall" />
       <PackageGroupRef Id="postinstall" />
diff --git a/Tools/msi/exe/exe.wixproj b/Tools/msi/exe/exe.wixproj
index be44f442f7c9d..592c8d2f65ae6 100644
--- a/Tools/msi/exe/exe.wixproj
+++ b/Tools/msi/exe/exe.wixproj
@@ -32,18 +32,9 @@
         <Exec Command="$(Blurb) merge -f "$(BuildPath)NEWS.txt"" WorkingDirectory="$(PCbuild)" />
     </Target>
     
-    <Target Name="_MergeMiscNewsWithPython" AfterTargets="PrepareForBuild" Condition="$(Blurb) == '' and !Exists('$(PySourcePath)Misc\NEWS')">
-        <ItemGroup>
-            <HostPython Include="$(ExternalsDir)python*\tools\python.exe" />
-            <HostPython Include="@(HostPython)" Condition="Exists(%(FullPath))" />
-            <HostPython Include="py" Condition="@(HostPython) == ''" />
-        </ItemGroup>
-        <PropertyGroup>
-            <HostPython>@(HostPython)</HostPython>
-            <HostPython Condition="$(HostPython.Contains(';'))">$(HostPython.Remove($(HostPython.IndexOf(';'))))</HostPython>
-        </PropertyGroup>
-        <Exec Command=""$(HostPython)" -m pip install -U blurb" WorkingDirectory="$(PCbuild)" />
-        <Exec Command=""$(HostPython)" -m blurb merge -f "$(BuildPath)NEWS.txt"" WorkingDirectory="$(PCbuild)" />
+    <Target Name="_MergeMiscNewsWithPython" AfterTargets="PrepareForBuild" Condition="$(Blurb) == '' and !Exists('$(PySourcePath)Misc\NEWS')" DependsOnTargets="FindPythonForBuild">
+        <Exec Command="$(PythonForBuild) -m pip install -U blurb" WorkingDirectory="$(PCbuild)" />
+        <Exec Command="$(PythonForBuild) -m blurb merge -f "$(BuildPath)NEWS.txt"" WorkingDirectory="$(PCbuild)" />
     </Target>
     
     <Import Project="..\msi.targets" />



More information about the Python-checkins mailing list