]> granicus.if.org Git - python/commitdiff
Issue #25102: Windows installer does not precompile for -O or -OO.
authorSteve Dower <steve.dower@microsoft.com>
Tue, 22 Sep 2015 23:45:19 +0000 (16:45 -0700)
committerSteve Dower <steve.dower@microsoft.com>
Tue, 22 Sep 2015 23:45:19 +0000 (16:45 -0700)
Misc/NEWS
Tools/msi/bundle/bundle.wxl
Tools/msi/bundle/packagegroups/postinstall.wxs

index 2ed6491172434ee5f2c649f0af8264bf7d1601d6..36cb6e4db3d8b0d5fc0b7917511fe0d0d1b048c2 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -150,6 +150,8 @@ Build
 Windows
 -------
 
+- Issue #25102: Windows installer does not precompile for -O or -OO.
+
 - Issue #25081: Makes Back button in installer go back to upgrade page when
   upgrading.
 
index 684e0dac4e3126843051fa998d46936216e79694..d7a65c48dc4dc531d0dea51a19eb8184b5d9c2a8 100644 (file)
@@ -2,4 +2,6 @@
 <WixLocalization Culture="en-us" xmlns="http://schemas.microsoft.com/wix/2006/localization">
   <String Id="CRTDescription">C Runtime Update (KB2999226)</String>
   <String Id="CompileAllDescription">Precompiling standard library</String>
+  <String Id="CompileAllODescription">Precompiling standard library (-O)</String>
+  <String Id="CompileAllOODescription">Precompiling standard library (-OO)</String>
 </WixLocalization>
index 7b0f3fc818e03cb59673dcae102f78b2e959e356..b40c2a5a305ef40ba65fabd32065243c14e13281 100644 (file)
                 <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
             </MsiPackage>
             
-            <?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"?>
+            <?define CompileAllCommand=-E -s -Wi "[TargetDir]\Lib\compileall.py" -f -x "bad_coding|badsyntax|site-packages|py2_|lib2to3\\tests|venv\\scripts" "[TargetDir]\Lib"?>
             <ExePackage Id="compileall_AllUsers"
                         SourceFile="py.exe"
                         Compressed="yes"
                         DisplayName="!(loc.CompileAllDescription)"
-                        InstallCommand='$(var.CompileAllCommand)'
-                        RepairCommand='$(var.CompileAllCommand)'
+                        InstallCommand='-$(var.ShortVersion)$(var.Suffix32) $(var.CompileAllCommand)'
+                        RepairCommand='-$(var.ShortVersion)$(var.Suffix32) $(var.CompileAllCommand)'
                         Permanent="yes"
                         PerMachine="yes"
                         Vital="no"
                         InstallCondition="InstallAllUsers and CompileAll and not LauncherOnly" />
+            <ExePackage Id="compileallO_AllUsers"
+                        SourceFile="py.exe"
+                        Compressed="yes"
+                        DisplayName="!(loc.CompileAllODescription)"
+                        InstallCommand='-$(var.ShortVersion)$(var.Suffix32) -O $(var.CompileAllCommand)'
+                        RepairCommand='-$(var.ShortVersion)$(var.Suffix32) -O $(var.CompileAllCommand)'
+                        Permanent="yes"
+                        PerMachine="yes"
+                        Vital="no"
+                        InstallCondition="InstallAllUsers and CompileAll and not LauncherOnly" />
+            <ExePackage Id="compileallOO_AllUsers"
+                        SourceFile="py.exe"
+                        Compressed="yes"
+                        DisplayName="!(loc.CompileAllOODescription)"
+                        InstallCommand='-$(var.ShortVersion)$(var.Suffix32) -OO $(var.CompileAllCommand)'
+                        RepairCommand='-$(var.ShortVersion)$(var.Suffix32) -OO $(var.CompileAllCommand)'
+                        Permanent="yes"
+                        PerMachine="yes"
+                        Vital="no"
+                        InstallCondition="InstallAllUsers and CompileAll and not LauncherOnly" />
+
             <ExePackage Id="compileall_JustForMe"
                         SourceFile="py.exe"
                         Compressed="yes"
                         DisplayName="!(loc.CompileAllDescription)"
-                        InstallCommand='$(var.CompileAllCommand)'
-                        RepairCommand='$(var.CompileAllCommand)'
+                        InstallCommand='-$(var.ShortVersion)$(var.Suffix32) $(var.CompileAllCommand)'
+                        RepairCommand='-$(var.ShortVersion)$(var.Suffix32) $(var.CompileAllCommand)'
+                        Permanent="yes"
+                        PerMachine="no"
+                        Vital="no"
+                        InstallCondition="not InstallAllUsers and CompileAll and not LauncherOnly" />
+            <ExePackage Id="compileallO_JustForMe"
+                        SourceFile="py.exe"
+                        Compressed="yes"
+                        DisplayName="!(loc.CompileAllODescription)"
+                        InstallCommand='-$(var.ShortVersion)$(var.Suffix32) -O $(var.CompileAllCommand)'
+                        RepairCommand='-$(var.ShortVersion)$(var.Suffix32) -O $(var.CompileAllCommand)'
+                        Permanent="yes"
+                        PerMachine="no"
+                        Vital="no"
+                        InstallCondition="not InstallAllUsers and CompileAll and not LauncherOnly" />
+            <ExePackage Id="compileallOO_JustForMe"
+                        SourceFile="py.exe"
+                        Compressed="yes"
+                        DisplayName="!(loc.CompileAllOODescription)"
+                        InstallCommand='-$(var.ShortVersion)$(var.Suffix32) -OO $(var.CompileAllCommand)'
+                        RepairCommand='-$(var.ShortVersion)$(var.Suffix32) -OO $(var.CompileAllCommand)'
                         Permanent="yes"
                         PerMachine="no"
                         Vital="no"