]> granicus.if.org Git - python/commitdiff
Ignore user environment/site-packages for ensurepip and compile_all
authorSteve Dower <steve.dower@microsoft.com>
Sat, 4 Jul 2015 18:48:37 +0000 (11:48 -0700)
committerSteve Dower <steve.dower@microsoft.com>
Sat, 4 Jul 2015 18:48:37 +0000 (11:48 -0700)
Remove build condition to prevent old strings hanging around
Add -h option to build.bat

Tools/msi/build.bat
Tools/msi/bundle/packagegroups/postinstall.wxs
Tools/msi/msi.targets
Tools/msi/pip/pip.wxs

index 4dfa5fb8bdb574a66adc309e9c67a80f2e93b342..1dc05c399746858bba3465fddcfa75f10e741c68 100644 (file)
@@ -8,9 +8,10 @@ set BUILDX64=
 set BUILDDOC=\r
 \r
 :CheckOpts\r
-if '%1'=='-x86' (set BUILDX86=1) && shift && goto CheckOpts\r
-if '%1'=='-x64' (set BUILDX64=1) && shift && goto CheckOpts\r
-if '%1'=='--doc' (set BUILDDOC=1) && shift && goto CheckOpts\r
+if "%1" EQU "-h" goto Help\r
+if "%1" EQU "-x86" (set BUILDX86=1) && shift && goto CheckOpts\r
+if "%1" EQU "-x64" (set BUILDX64=1) && shift && goto CheckOpts\r
+if "%1" EQU "--doc" (set BUILDDOC=1) && shift && goto CheckOpts\r
 \r
 if not defined BUILDX86 if not defined BUILDX64 (set BUILDX86=1) && (set BUILDX64=1)\r
 \r
@@ -44,3 +45,12 @@ if defined BUILDX64 (
     msbuild "%D%bundle\snapshot.wixproj" /p:Platform=x64\r
     if errorlevel 1 goto :eof\r
 )\r
+\r
+exit /B 0\r
+\r
+:Help\r
+echo build.bat [-x86] [-x64] [--doc] [-h]\r
+echo.\r
+echo    -x86                Build x86 installers\r
+echo    -x64                Build x64 installers\r
+echo    --doc               Build CHM documentation\r
index b20cc501b767808b993b23bb48e2d1c3fbcdd436..35978cc7c6f75b04020d12c567856daedddd2b8c 100644 (file)
@@ -36,7 +36,7 @@
                 <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
             </MsiPackage>
             
-            <?define CompileAllCommand=-$(var.ShortVersion)$(var.Suffix32) -Wi "[TargetDir]\Lib\compileall.py" -f -x "bad_coding|badsyntax|site-packages|py2_|lib2to3\\tests|venv\\scripts" "[TargetDir]\Lib"?>
+            <?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"?>
             <ExePackage Id="compileall_AllUsers"
                         SourceFile="py.exe"
                         Compressed="yes"
index b507dc3a83677543f2f60fdb7ddf60cc8fdd7df9..34b8747fff4023f919e4196c3e1fda0616681cb3 100644 (file)
@@ -24,7 +24,7 @@
         </ItemGroup>
     </Target>
 
-    <Target Name="_TransformWxlTemplates" AfterTargets="PrepareForBuild" Inputs="@(WxlTemplate)" Outputs="$(IntermediateOutputPath)%(Filename).wxl">
+    <Target Name="_TransformWxlTemplates" AfterTargets="PrepareForBuild">
         <PropertyGroup>
             <_Content>$([System.IO.File]::ReadAllText(%(WxlTemplate.FullPath)).Replace(`{{ShortVersion}}`, `$(MajorVersionNumber).$(MinorVersionNumber)`).Replace(`{{LongVersion}}`, `$(PythonVersion)`).Replace(`{{Bitness}}`, `$(Bitness)`))</_Content>
             <_ExistingContent Condition="Exists('$(IntermediateOutputPath)%(WxlTemplate.Filename).wxl')">$([System.IO.File]::ReadAllText($(IntermediateOutputPath)%(WxlTemplate.Filename).wxl))</_ExistingContent>
index 4c3dc59ec3b180ceb3e42cb9053370ee308501b0..c46a868188838b390b6085d62ae0037009230334 100644 (file)
@@ -27,8 +27,8 @@
         <?endif ?>
         
         <!-- Install/uninstall pip -->
-        <CustomAction Id="SetUpdatePipCommandLine" Property="UpdatePip" Value='"[PYTHON_EXE]" -m ensurepip -U --default-pip' Execute="immediate" />
-        <CustomAction Id="SetRemovePipCommandLine" Property="UpdatePip" Value='"[PYTHON_EXE]" -B -m ensurepip._uninstall' Execute="immediate" />
+        <CustomAction Id="SetUpdatePipCommandLine" Property="UpdatePip" Value='"[PYTHON_EXE]" -E -s -m ensurepip -U --default-pip' Execute="immediate" />
+        <CustomAction Id="SetRemovePipCommandLine" Property="UpdatePip" Value='"[PYTHON_EXE]" -E -s -B -m ensurepip._uninstall' Execute="immediate" />
         
         <InstallExecuteSequence>
             <Custom Action="SetUpdatePipCommandLine" Before="UpdatePip">(&amp;DefaultFeature=3) AND NOT (!DefaultFeature=3)</Custom>