]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-47171: Enable installing the py.exe launcher on Windows ARM64 (GH-32203)
authorSteve Dower <steve.dower@python.org>
Wed, 30 Mar 2022 20:20:38 +0000 (21:20 +0100)
committerGitHub <noreply@github.com>
Wed, 30 Mar 2022 20:20:38 +0000 (21:20 +0100)
Misc/NEWS.d/next/Windows/2022-03-30-19-55-00.bpo-47171.MbqCWn.rst [new file with mode: 0644]
Tools/msi/bundle/Default.ARM64.xsl
Tools/msi/bundle/bundle.wxs
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 (file)
index 0000000..d9f1795
--- /dev/null
@@ -0,0 +1 @@
+Enables installing the :file:`py.exe` launcher on Windows ARM64.
index f63da4e7274cbef3fad6ded88933413904bc2dd7..b28b3f264adbc2d6bc2f1fef5e25897b842b6a39 100644 (file)
         </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
index ac4b7a6d753080919a339fa2ba6fd9ca8845512a..19e67faf887bc7ae21c73b4a9b47a6215231f8cc 100644 (file)
@@ -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" />
     <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" />
 
       <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" />
index be44f442f7c9d8a5112979476d5cb6962f9ab1c7..592c8d2f65ae6e00202256be94280155c3fcdbb9 100644 (file)
         <Exec Command="$(Blurb) merge -f &quot;$(BuildPath)NEWS.txt&quot;" 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="&quot;$(HostPython)&quot; -m pip install -U blurb" WorkingDirectory="$(PCbuild)" />
-        <Exec Command="&quot;$(HostPython)&quot; -m blurb merge -f &quot;$(BuildPath)NEWS.txt&quot;" 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 &quot;$(BuildPath)NEWS.txt&quot;" WorkingDirectory="$(PCbuild)" />
     </Target>
     
     <Import Project="..\msi.targets" />