Skip to content

Commit 2ab609d

Browse files
authored
bpo-47171: Enable installing the py.exe launcher on Windows ARM64 (pythonGH-32203)
1 parent 581c443 commit 2ab609d

File tree

4 files changed

+10
-22
lines changed

4 files changed

+10
-22
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Enables installing the :file:`py.exe` launcher on Windows ARM64.

Tools/msi/bundle/Default.ARM64.xsl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
</xsl:copy>
1111
</xsl:template>
1212

13+
<!--
14+
** No longer need this change, but I'm leaving the snippets here as an example
15+
** in case we need to add another override in the future.
16+
1317
<xsl:template match="*[local-name()='String' and @Id='InstallButtonNote']">
1418
<String Id="InstallButtonNote">[TargetDir]
1519
@@ -20,4 +24,5 @@ Creates shortcuts but no file associations</String>
2024
<xsl:template match="*[local-name()='String' and @Id='Include_launcherHelp']">
2125
<String Id="Include_launcherHelp">(The 'py' launcher is currently unavailable on ARM64.)</String>
2226
</xsl:template>
27+
-->
2328
</xsl:stylesheet>

Tools/msi/bundle/bundle.wxs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,7 @@
5656
<Variable Name="DefaultCustomTargetDir" Value="" bal:Overridable="yes" />
5757

5858
<Variable Name="InstallAllUsersState" Value="enabled" bal:Overridable="yes" />
59-
<?if "$(var.Platform)"~="ARM64" ?>
60-
<Variable Name="InstallLauncherAllUsersState" Value="hide" bal:Overridable="yes" />
61-
<?elseif "$(var.PyTestExt)"="" ?>
59+
<?if "$(var.PyTestExt)"="" ?>
6260
<Variable Name="InstallLauncherAllUsersState" Value="enabled" bal:Overridable="yes" />
6361
<?else ?>
6462
<Variable Name="InstallLauncherAllUsersState" Value="disable" bal:Overridable="yes" />
@@ -76,17 +74,12 @@
7674
<Variable Name="Include_tools" Value="1" bal:Overridable="yes" />
7775
<Variable Name="Include_tcltk" Value="1" bal:Overridable="yes" />
7876
<Variable Name="Include_pip" Value="1" bal:Overridable="yes" />
79-
<?if $(var.Platform)~="ARM64" ?>
80-
<Variable Name="Include_launcher" Value="0" bal:Overridable="yes" />
81-
<Variable Name="Include_launcherState" Value="disable" />
82-
<?else ?>
8377
<Variable Name="Include_launcher" Value="-1" bal:Overridable="yes" />
8478
<?if "$(var.PyTestExt)"="" ?>
8579
<Variable Name="Include_launcherState" Value="enabled" bal:Overridable="yes" />
8680
<?else ?>
8781
<Variable Name="Include_launcherState" Value="disable" />
8882
<?endif ?>
89-
<?endif ?>
9083
<Variable Name="Include_symbols" Value="0" bal:Overridable="yes" />
9184
<Variable Name="Include_debug" Value="0" bal:Overridable="yes" />
9285

@@ -115,9 +108,7 @@
115108
<PackageGroupRef Id="doc" />
116109
<PackageGroupRef Id="tools" />
117110
<PackageGroupRef Id="tcltk" />
118-
<?if $(var.Platform)!="ARM64" ?>
119111
<PackageGroupRef Id="launcher" />
120-
<?endif ?>
121112
<PackageGroupRef Id="pip" />
122113
<PackageGroupRef Id="packageinstall" />
123114
<PackageGroupRef Id="postinstall" />

Tools/msi/exe/exe.wixproj

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,9 @@
3232
<Exec Command="$(Blurb) merge -f &quot;$(BuildPath)NEWS.txt&quot;" WorkingDirectory="$(PCbuild)" />
3333
</Target>
3434

35-
<Target Name="_MergeMiscNewsWithPython" AfterTargets="PrepareForBuild" Condition="$(Blurb) == '' and !Exists('$(PySourcePath)Misc\NEWS')">
36-
<ItemGroup>
37-
<HostPython Include="$(ExternalsDir)python*\tools\python.exe" />
38-
<HostPython Include="@(HostPython)" Condition="Exists(%(FullPath))" />
39-
<HostPython Include="py" Condition="@(HostPython) == ''" />
40-
</ItemGroup>
41-
<PropertyGroup>
42-
<HostPython>@(HostPython)</HostPython>
43-
<HostPython Condition="$(HostPython.Contains(';'))">$(HostPython.Remove($(HostPython.IndexOf(';'))))</HostPython>
44-
</PropertyGroup>
45-
<Exec Command="&quot;$(HostPython)&quot; -m pip install -U blurb" WorkingDirectory="$(PCbuild)" />
46-
<Exec Command="&quot;$(HostPython)&quot; -m blurb merge -f &quot;$(BuildPath)NEWS.txt&quot;" WorkingDirectory="$(PCbuild)" />
35+
<Target Name="_MergeMiscNewsWithPython" AfterTargets="PrepareForBuild" Condition="$(Blurb) == '' and !Exists('$(PySourcePath)Misc\NEWS')" DependsOnTargets="FindPythonForBuild">
36+
<Exec Command="$(PythonForBuild) -m pip install -U blurb" WorkingDirectory="$(PCbuild)" />
37+
<Exec Command="$(PythonForBuild) -m blurb merge -f &quot;$(BuildPath)NEWS.txt&quot;" WorkingDirectory="$(PCbuild)" />
4738
</Target>
4839

4940
<Import Project="..\msi.targets" />

0 commit comments

Comments
 (0)