diff options
author | Steve Dower <steve.dower@microsoft.com> | 2016-10-27 19:08:45 (GMT) |
---|---|---|
committer | Steve Dower <steve.dower@microsoft.com> | 2016-10-27 19:08:45 (GMT) |
commit | fcf622e30e780785900f808fce99fd9f9e2491fd (patch) | |
tree | f439bb44d0d2cc025ff12695389955eee30ec42b /Tools | |
parent | 1ecf7d204dd3abb143f53851c31fefd4ef887314 (diff) | |
download | cpython-fcf622e30e780785900f808fce99fd9f9e2491fd.zip cpython-fcf622e30e780785900f808fce99fd9f9e2491fd.tar.gz cpython-fcf622e30e780785900f808fce99fd9f9e2491fd.tar.bz2 |
Updates release build to collect symbols and binaries, and create nuget package.
Diffstat (limited to 'Tools')
-rw-r--r-- | Tools/msi/buildrelease.bat | 30 | ||||
-rw-r--r-- | Tools/msi/make_zip.proj | 2 | ||||
-rw-r--r-- | Tools/nuget/make_pkg.proj | 2 |
3 files changed, 25 insertions, 9 deletions
diff --git a/Tools/msi/buildrelease.bat b/Tools/msi/buildrelease.bat index e8da3ec..1fa2dcb 100644 --- a/Tools/msi/buildrelease.bat +++ b/Tools/msi/buildrelease.bat @@ -36,6 +36,8 @@ set BUILDX64= set TARGET=Rebuild
set TESTTARGETDIR=
set PGO=
+set BUILDNUGET=1
+set BUILDZIP=1
:CheckOpts
@@ -55,6 +57,8 @@ if "%1" EQU "--build" (set TARGET=Build) && shift && goto CheckOpts if "%1" EQU "-x86" (set BUILDX86=1) && shift && goto CheckOpts
if "%1" EQU "-x64" (set BUILDX64=1) && shift && goto CheckOpts
if "%1" EQU "--pgo" (set PGO=%~2) && shift && shift && goto CheckOpts
+if "%1" EQU "--skip-nuget" (set BUILDNUGET=) && shift && goto CheckOpts
+if "%1" EQU "--skip-zip" (set BUILDZIP=) && shift && goto CheckOpts
if "%1" NEQ "" echo Invalid option: "%1" && exit /B 1
@@ -182,21 +186,31 @@ if errorlevel 1 exit /B msbuild "%D%bundle\releaseweb.wixproj" /t:Rebuild /p:Platform=%1 %BUILDOPTS% %CERTOPTS% /p:RebuildAll=false
if errorlevel 1 exit /B
-msbuild "%D%make_zip.proj" /t:Build %BUILDOPTS% %CERTOPTS%
+if defined BUILDZIP (
+ msbuild "%D%make_zip.proj" /t:Build %BUILDOPTS% %CERTOPTS%
+ if errorlevel 1 exit /B
+)
+
+if defined BUILDNUGET (
+ msbuild "%D%..\nuget\make_pkg.proj" /t:Build /p:Configuration=Release /p:Platform=%1 /p:OutputPath="%BUILD%en-us"
+ if errorlevel 1 exit /B
+)
if not "%OUTDIR%" EQU "" (
mkdir "%OUTDIR%\%OUTDIR_PLAT%"
- copy /Y "%BUILD%en-us\*.cab" "%OUTDIR%\%OUTDIR_PLAT%"
- copy /Y "%BUILD%en-us\*.exe" "%OUTDIR%\%OUTDIR_PLAT%"
- copy /Y "%BUILD%en-us\*.msi" "%OUTDIR%\%OUTDIR_PLAT%"
- copy /Y "%BUILD%en-us\*.msu" "%OUTDIR%\%OUTDIR_PLAT%"
+ mkdir "%OUTDIR%\%OUTDIR_PLAT%\binaries"
+ mkdir "%OUTDIR%\%OUTDIR_PLAT%\symbols"
+ robocopy "%BUILD%en-us" "%OUTDIR%\%OUTDIR_PLAT%" /XF "*.wixpdb"
+ robocopy "%BUILD%\" "%OUTDIR%\%OUTDIR_PLAT%\binaries" *.exe *.dll *.pyd /XF "_test*" /XF "*_d.*" /XF "_freeze*" /XF "tcl*" /XF "tk*" /XF "*_test.*"
+ robocopy "%BUILD%\" "%OUTDIR%\%OUTDIR_PLAT%\symbols" *.pdb /XF "_test*" /XF "*_d.*" /XF "_freeze*" /XF "tcl*" /XF "tk*" /XF "*_test.*"
)
exit /B 0
:Help
-echo buildrelease.bat [--out DIR] [-x86] [-x64] [--certificate CERTNAME] [--build] [--skip-build]
-echo [--pgo COMMAND] [--skip-doc] [--download DOWNLOAD URL] [--test TARGETDIR]
+echo buildrelease.bat [--out DIR] [-x86] [-x64] [--certificate CERTNAME] [--build] [--pgo COMMAND]
+echo [--skip-build] [--skip-doc] [--skip-nuget] [--skip-zip]
+echo [--download DOWNLOAD URL] [--test TARGETDIR]
echo [-h]
echo.
echo --out (-o) Specify an additional output directory for installers
@@ -205,6 +219,8 @@ echo -x64 Build x64 installers echo --build (-b) Incrementally build Python rather than rebuilding
echo --skip-build (-B) Do not build Python (just do the installers)
echo --skip-doc (-D) Do not build documentation
+echo --skip-nuget Do not build Nuget packages
+echo --skip-zip Do not build embeddable package
echo --pgo Build x64 installers using PGO
echo --download Specify the full download URL for MSIs
echo --test Specify the test directory to run the installer tests
diff --git a/Tools/msi/make_zip.proj b/Tools/msi/make_zip.proj index c411a48..13f75ba 100644 --- a/Tools/msi/make_zip.proj +++ b/Tools/msi/make_zip.proj @@ -16,7 +16,7 @@ <TargetPath>$(OutputPath)\en-us\$(TargetName)$(TargetExt)</TargetPath> <CleanCommand>rmdir /q/s "$(IntermediateOutputPath)\zip_$(ArchName)"</CleanCommand> <Arguments>"$(PythonExe)" "$(MSBuildThisFileDirectory)\make_zip.py"</Arguments> - <Arguments>$(Arguments) -e -o "$(TargetPath)" -t "$(IntermediateOutputPath)\zip_$(ArchName)" -a "$(ArchName)"</Arguments> + <Arguments>$(Arguments) -e -o "$(TargetPath)" -t "$(IntermediateOutputPath)\zip_$(ArchName)" -b "$(OutDir.TrimEnd('\'))"</Arguments> <Environment>set DOC_FILENAME=python$(PythonVersion).chm set VCREDIST_PATH=$(VS140COMNTOOLS)\..\..\VC\redist\$(Platform)\Microsoft.VC140.CRT</Environment> </PropertyGroup> diff --git a/Tools/nuget/make_pkg.proj b/Tools/nuget/make_pkg.proj index 542bf07..96f54dc 100644 --- a/Tools/nuget/make_pkg.proj +++ b/Tools/nuget/make_pkg.proj @@ -23,7 +23,7 @@ <CleanCommand>rmdir /q/s "$(IntermediateOutputPath)"</CleanCommand> <PythonArguments>"$(PythonExe)" "$(MSBuildThisFileDirectory)\..\msi\make_zip.py"</PythonArguments> - <PythonArguments>$(PythonArguments) -t "$(IntermediateOutputPath)" -a $(ArchName)</PythonArguments> + <PythonArguments>$(PythonArguments) -t "$(IntermediateOutputPath)" -b "$(OutDir.TrimEnd('\'))\.."</PythonArguments> <PipArguments>"$(IntermediateOutputPath)\python.exe" -B -c "import sys; sys.path.append(r'$(PySourcePath)\Lib'); import ensurepip; ensurepip._main()"</PipArguments> <PackageArguments Condition="$(Packages) != ''">"$(IntermediateOutputPath)\python.exe" -B -m pip install -U $(Packages)</PackageArguments> |