8000 Issue #25102: Windows installer does not precompile for -O or -OO. · python/cpython@a2ea0e4 · GitHub
[go: up one dir, main page]

Skip to content
Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a2ea0e4

Browse files
committed
Issue #25102: Windows installer does not precompile for -O or -OO.
1 parent 44fe401 commit a2ea0e4

File tree

3 files changed

+50
-5
lines changed

3 files changed

+50
-5
lines changed

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,8 @@ Build
150150
Windows
151151
-------
152152

153+
- Issue #25102: Windows installer does not precompile for -O or -OO.
154+
153155
- Issue #25081: Makes Back button in installer go back to upgrade page when
154156
upgrading.
155157

Tools/msi/bundle/bundle.wxl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@
22
<WixLocalization Culture="en-us" xmlns="http://schemas.microsoft.com/wix/2006/localization">
33
<String Id="CRTDescription">C Runtime Update (KB2999226)</String>
44
<String Id="CompileAllDescription">Precompiling standard library</String>
5+
<String Id="CompileAllODescription">Precompiling standard library (-O)</String>
6+
<String Id="CompileAllOODescription">Precompiling standard library (-OO)</String>
57
</WixLocalization>

Tools/msi/bundle/packagegroups/postinstall.wxs

Lines changed: 46 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,23 +40,64 @@
4040
<MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
4141
</MsiPackage>
4242

43-
<?define CompileAllCommand=-$(var.ShortVersion)$(var.Suffix32) -E -s -Wi "[TargetDir]\Lib\compileall.py" -f -x "bad_coding|badsyntax|site-packages|py2_|lib2to3\\tests|venv\\scripts" "[TargetDir]\Lib"?>
43+
<?define CompileAllCommand=-E -s -Wi "[TargetDir]\Lib\compileall.py" -f -x "bad_coding|badsyntax|site-packages|py2_|lib2to3\\tests|venv\\scripts" "[TargetDir]\Lib"?>
4444
<ExePackage Id="compileall_AllUsers"
4545
SourceFile="py.exe"
4646
Compressed="yes"
4747
DisplayName="!(loc.CompileAllDescription)"
48-
InstallCommand='$(var.CompileAllCommand)'
49-
RepairCommand='$(var.CompileAllCommand)'
48+
InstallCommand='-$(var.ShortVersion)$(var.Suffix32) $(var.CompileAllCommand)'
49+
RepairCommand='-$(var.ShortVersion)$(var.Suffix32) $(var.CompileAllCommand)'
5050
Permanent="yes"
5151
PerMachine="yes"
5252
Vital="no"
5353
InstallCondition="InstallAllUsers and CompileAll and not LauncherOnly" />
54+
<ExePackage Id="compileallO_AllUsers"
55+
SourceFile="py.exe"
56+
Compressed="yes"
57+
DisplayName="!(loc.CompileAllODescription)"
58+
InstallCommand='-$(var.ShortVersion)$(var.Suffix32) -O $(var.CompileAllCommand)'
59+
RepairCommand='-$(var.ShortVersion)$(var.Suffix32) -O $(var.CompileAllCommand)'
60+
Permanent="yes"
61+
PerMachine="yes"
62+
Vital="no"
63+
InstallCondition="InstallAllUsers and CompileAll and not LauncherOnly" />
64+
<ExePackage Id="compileallOO_AllUsers"
65+
SourceFile="py.exe"
66+
Compressed="yes"
67+
DisplayName="!(loc.CompileAllOODescription)"
68+
InstallCommand='-$(var.ShortVersion)$(var.Suffix32) -OO $(var.CompileAllCommand)'
69+
RepairCommand='-$(var.ShortVersion)$(var.Suffix32) -OO $(var.CompileAllCommand)'
70+
Permanent="yes"
71+
PerMachine="yes"
72+
Vital="no"
73+
InstallCondition="InstallAllUsers and CompileAll and not LauncherOnly" />
74+
5475
<ExePackage Id="compileall_JustForMe"
5576
SourceFile="py.exe"
5677
Compressed="yes"
5778
DisplayName="!(loc.CompileAllDescription)"
58-
InstallCommand='$(var.CompileAllCommand)'
59-
RepairCommand='$(var.CompileAllCommand)'
79+
InstallCommand='-$(var.ShortVersion)$(var.Suffix32) $(var.CompileAllCommand)'
80+
RepairCommand='-$(var.ShortVersion)$(var.Suffix32) $(var.CompileAllCommand)'
81+
Permanent="yes"
82+
PerMachine="no"
83+
Vital="no"
84+
InstallCondition="not InstallAllUsers and CompileAll and not LauncherOnly" />
85+
<ExePackage Id="compileallO_JustForMe"
86+
SourceFile="py.exe"
87+
Compressed="yes"
88+
DisplayName="!(loc.CompileAllODescription)"
89+
InstallCommand='-$(var.ShortVersion)$(var.Suffix32) -O $(var.CompileAllCommand)'
90+
RepairCommand='-$(var.ShortVersion)$(var.Suffix32) -O $(var.CompileAllCommand)'
91+
Permanent="yes"
92+
PerMachine="no"
93+
Vital="no"
94+
InstallCondition="not InstallAllUsers and CompileAll and not LauncherOnly" />
95+
<ExePackage Id="compileallOO_JustForMe"
96+
SourceFile="py.exe"
97+
Compressed="yes"
98+
DisplayName="!(loc.CompileAllOODescription)"
99+
InstallCommand='-$(var.ShortVersion)$(var.Suffix32) -OO $(var.CompileAllCommand)'
100+
RepairCommand='-$(var.ShortVersion)$(var.Suffix32) -OO $(var.CompileAllCommand)'
60101
Permanent="yes"
61102
PerMachine="no"
62103
Vital="no"

0 commit comments

Comments
 (0)
0