[Python-checkins] Fix Windows release build issues (GH-14091)

Steve Dower webhook-mailer at python.org
Fri Jun 14 17:19:28 EDT 2019


https://github.com/python/cpython/commit/749e73065dea1cc3a6d39a830380a2c124f568c2
commit: 749e73065dea1cc3a6d39a830380a2c124f568c2
branch: master
author: Steve Dower <steve.dower at python.org>
committer: GitHub <noreply at github.com>
date: 2019-06-14T14:19:25-07:00
summary:

Fix Windows release build issues (GH-14091)

* Increase timeout for PGO builds in Windows release
* Fix test step failures
* Disable MinGW step properly
* Fix embeddable distro name

files:
M .azure-pipelines/windows-release/msi-steps.yml
M .azure-pipelines/windows-release/stage-build.yml
M .azure-pipelines/windows-release/stage-layout-embed.yml
M .azure-pipelines/windows-release/stage-test-embed.yml
M Tools/msi/dev/dev.wixproj

diff --git a/.azure-pipelines/windows-release/msi-steps.yml b/.azure-pipelines/windows-release/msi-steps.yml
index 2f80c34eeb7d..153408271c71 100644
--- a/.azure-pipelines/windows-release/msi-steps.yml
+++ b/.azure-pipelines/windows-release/msi-steps.yml
@@ -94,8 +94,8 @@ steps:
       Py_OutDir: $(Build.BinariesDirectory)
 
   - script: |
-      %MSBUILD% Tools\msi\bundle\releaselocal.wixproj /t:Rebuild /p:RebuildAll=true /p:BuildForRelease=true
-      %MSBUILD% Tools\msi\bundle\releaseweb.wixproj /t:Rebuild /p:RebuildAll=false /p:BuildForRelease=true
+      %MSBUILD% Tools\msi\bundle\releaselocal.wixproj /t:Rebuild /p:RebuildAll=true
+      %MSBUILD% Tools\msi\bundle\releaseweb.wixproj /t:Rebuild /p:RebuildAll=false
     displayName: 'Build win32 installer'
     env:
       Platform: x86
@@ -103,10 +103,12 @@ steps:
       PYTHON: $(Build.BinariesDirectory)\win32\python.exe
       PYTHONHOME: $(Build.SourcesDirectory)
       TclTkLibraryDir: $(Build.BinariesDirectory)\tcltk_lib_win32
+      BuildForRelease: true
+      SuppressMinGWLib: true
 
   - script: |
-      %MSBUILD% Tools\msi\bundle\releaselocal.wixproj /t:Rebuild /p:RebuildAll=true /p:BuildForRelease=true
-      %MSBUILD% Tools\msi\bundle\releaseweb.wixproj /t:Rebuild /p:RebuildAll=false /p:BuildForRelease=true
+      %MSBUILD% Tools\msi\bundle\releaselocal.wixproj /t:Rebuild /p:RebuildAll=true
+      %MSBUILD% Tools\msi\bundle\releaseweb.wixproj /t:Rebuild /p:RebuildAll=false
     displayName: 'Build amd64 installer'
     env:
       Platform: x64
@@ -114,6 +116,8 @@ steps:
       PYTHON: $(Build.BinariesDirectory)\amd64\python.exe
       PYTHONHOME: $(Build.SourcesDirectory)
       TclTkLibraryDir: $(Build.BinariesDirectory)\tcltk_lib_amd64
+      BuildForRelease: true
+      SuppressMinGWLib: true
 
   - task: CopyFiles at 2
     displayName: 'Assemble artifact: msi (1/2)'
diff --git a/.azure-pipelines/windows-release/stage-build.yml b/.azure-pipelines/windows-release/stage-build.yml
index 121e4b1a278e..a5093a04f087 100644
--- a/.azure-pipelines/windows-release/stage-build.yml
+++ b/.azure-pipelines/windows-release/stage-build.yml
@@ -95,6 +95,9 @@ jobs:
   displayName: Python PGO build
   condition: and(succeeded(), eq(variables['DoPGO'], 'true'))
 
+  # Allow up to five hours for PGO
+  timeoutInMinutes: 300
+
   pool:
     name: 'Windows Release'
 
diff --git a/.azure-pipelines/windows-release/stage-layout-embed.yml b/.azure-pipelines/windows-release/stage-layout-embed.yml
index c9d58b6b30a2..e2689dbb603d 100644
--- a/.azure-pipelines/windows-release/stage-layout-embed.yml
+++ b/.azure-pipelines/windows-release/stage-layout-embed.yml
@@ -39,7 +39,7 @@ jobs:
   - powershell: >
       $(LayoutCmd)
       --copy "$(Build.ArtifactStagingDirectory)\layout"
-      --zip "$(Build.ArtifactStagingDirectory)\embed\$(VersionText)-embed-$(Name).zip"
+      --zip "$(Build.ArtifactStagingDirectory)\embed\python-$(VersionText)-embed-$(Name).zip"
       --preset-embed
     displayName: 'Generate embeddable layout'
 
diff --git a/.azure-pipelines/windows-release/stage-test-embed.yml b/.azure-pipelines/windows-release/stage-test-embed.yml
index ab377fdfa8c9..b33176266a20 100644
--- a/.azure-pipelines/windows-release/stage-test-embed.yml
+++ b/.azure-pipelines/windows-release/stage-test-embed.yml
@@ -26,7 +26,8 @@ jobs:
       downloadPath: $(Build.BinariesDirectory)
 
   - powershell: |
-      Expand-Archive -Path "$(Build.BinariesDirectory)\embed\embed-$(Name).zip" -DestinationPath "$(Build.BinariesDirectory)\Python"
+      $p = gi "$(Build.BinariesDirectory)\embed\python*embed-$(Name).zip"
+      Expand-Archive -Path $p -DestinationPath "$(Build.BinariesDirectory)\Python"
       $p = gi "$(Build.BinariesDirectory)\Python\python.exe"
       Write-Host "##vso[task.prependpath]$(Split-Path -Parent $p)"
     displayName: 'Install Python and add to PATH'
diff --git a/Tools/msi/dev/dev.wixproj b/Tools/msi/dev/dev.wixproj
index 4a56cec35722..c6e3bcf709c6 100644
--- a/Tools/msi/dev/dev.wixproj
+++ b/Tools/msi/dev/dev.wixproj
@@ -8,7 +8,7 @@
     </PropertyGroup>
     <Import Project="..\msi.props" />
     <PropertyGroup>
-        <DefineConstants Condition="$(BuildForRelease)">
+        <DefineConstants Condition="$(BuildForRelease) and $(SuppressMinGWLib) == ''">
             $(DefineConstants);
             IncludeMinGWLib=1;
         </DefineConstants>
@@ -35,7 +35,7 @@
             Inputs="$(BuildPath)$(PyDllName).dll"
             Outputs="$(BuildPath)lib$(PyDllName).a"
             AfterTargets="PrepareForBuild"
-            Condition="$(BuildForRelease)">
+            Condition="$(BuildForRelease) and $(SuppressMinGWLib) == ''">
         <!-- Build libpython##.a as part of this project. This requires gendef and dlltool on the path. -->
         <PropertyGroup>
             <_DllToolOpts>-m i386 --as-flags=--32</_DllToolOpts>



More information about the Python-checkins mailing list