mirror of https://github.com/python/cpython.git
Ignore user environment/site-packages for ensurepip and compile_all
Remove build condition to prevent old strings hanging around Add -h option to build.bat
This commit is contained in:
commit
7bcf919f47
|
@ -8,9 +8,10 @@ set BUILDX64=
|
||||||
set BUILDDOC=
|
set BUILDDOC=
|
||||||
|
|
||||||
:CheckOpts
|
:CheckOpts
|
||||||
if '%1'=='-x86' (set BUILDX86=1) && shift && goto CheckOpts
|
if "%1" EQU "-h" goto Help
|
||||||
if '%1'=='-x64' (set BUILDX64=1) && shift && goto CheckOpts
|
if "%1" EQU "-x86" (set BUILDX86=1) && shift && goto CheckOpts
|
||||||
if '%1'=='--doc' (set BUILDDOC=1) && shift && goto CheckOpts
|
if "%1" EQU "-x64" (set BUILDX64=1) && shift && goto CheckOpts
|
||||||
|
if "%1" EQU "--doc" (set BUILDDOC=1) && shift && goto CheckOpts
|
||||||
|
|
||||||
if not defined BUILDX86 if not defined BUILDX64 (set BUILDX86=1) && (set BUILDX64=1)
|
if not defined BUILDX86 if not defined BUILDX64 (set BUILDX86=1) && (set BUILDX64=1)
|
||||||
|
|
||||||
|
@ -44,3 +45,12 @@ if defined BUILDX64 (
|
||||||
msbuild "%D%bundle\snapshot.wixproj" /p:Platform=x64
|
msbuild "%D%bundle\snapshot.wixproj" /p:Platform=x64
|
||||||
if errorlevel 1 goto :eof
|
if errorlevel 1 goto :eof
|
||||||
)
|
)
|
||||||
|
|
||||||
|
exit /B 0
|
||||||
|
|
||||||
|
:Help
|
||||||
|
echo build.bat [-x86] [-x64] [--doc] [-h]
|
||||||
|
echo.
|
||||||
|
echo -x86 Build x86 installers
|
||||||
|
echo -x64 Build x64 installers
|
||||||
|
echo --doc Build CHM documentation
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
|
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
|
||||||
</MsiPackage>
|
</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"
|
<ExePackage Id="compileall_AllUsers"
|
||||||
SourceFile="py.exe"
|
SourceFile="py.exe"
|
||||||
Compressed="yes"
|
Compressed="yes"
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<Target Name="_TransformWxlTemplates" AfterTargets="PrepareForBuild" Inputs="@(WxlTemplate)" Outputs="$(IntermediateOutputPath)%(Filename).wxl">
|
<Target Name="_TransformWxlTemplates" AfterTargets="PrepareForBuild">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<_Content>$([System.IO.File]::ReadAllText(%(WxlTemplate.FullPath)).Replace(`{{ShortVersion}}`, `$(MajorVersionNumber).$(MinorVersionNumber)`).Replace(`{{LongVersion}}`, `$(PythonVersion)`).Replace(`{{Bitness}}`, `$(Bitness)`))</_Content>
|
<_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>
|
<_ExistingContent Condition="Exists('$(IntermediateOutputPath)%(WxlTemplate.Filename).wxl')">$([System.IO.File]::ReadAllText($(IntermediateOutputPath)%(WxlTemplate.Filename).wxl))</_ExistingContent>
|
||||||
|
|
|
@ -27,8 +27,8 @@
|
||||||
<?endif ?>
|
<?endif ?>
|
||||||
|
|
||||||
<!-- Install/uninstall pip -->
|
<!-- Install/uninstall pip -->
|
||||||
<CustomAction Id="SetUpdatePipCommandLine" Property="UpdatePip" Value='"[PYTHON_EXE]" -m ensurepip -U --default-pip' 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]" -B -m ensurepip._uninstall' Execute="immediate" />
|
<CustomAction Id="SetRemovePipCommandLine" Property="UpdatePip" Value='"[PYTHON_EXE]" -E -s -B -m ensurepip._uninstall' Execute="immediate" />
|
||||||
|
|
||||||
<InstallExecuteSequence>
|
<InstallExecuteSequence>
|
||||||
<Custom Action="SetUpdatePipCommandLine" Before="UpdatePip">(&DefaultFeature=3) AND NOT (!DefaultFeature=3)</Custom>
|
<Custom Action="SetUpdatePipCommandLine" Before="UpdatePip">(&DefaultFeature=3) AND NOT (!DefaultFeature=3)</Custom>
|
||||||
|
|
Loading…
Reference in New Issue