Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 749e730

Browse files
authored
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
1 parent bd5798f commit 749e730

5 files changed

Lines changed: 16 additions & 8 deletions

File tree

.azure-pipelines/windows-release/msi-steps.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,26 +94,30 @@ steps:
9494
Py_OutDir: $(Build.BinariesDirectory)
9595
9696
- script: |
97-
%MSBUILD% Tools\msi\bundle\releaselocal.wixproj /t:Rebuild /p:RebuildAll=true /p:BuildForRelease=true
98-
%MSBUILD% Tools\msi\bundle\releaseweb.wixproj /t:Rebuild /p:RebuildAll=false /p:BuildForRelease=true
97+
%MSBUILD% Tools\msi\bundle\releaselocal.wixproj /t:Rebuild /p:RebuildAll=true
98+
%MSBUILD% Tools\msi\bundle\releaseweb.wixproj /t:Rebuild /p:RebuildAll=false
9999
displayName: 'Build win32 installer'
100100
env:
101101
Platform: x86
102102
Py_OutDir: $(Build.BinariesDirectory)
103103
PYTHON: $(Build.BinariesDirectory)\win32\python.exe
104104
PYTHONHOME: $(Build.SourcesDirectory)
105105
TclTkLibraryDir: $(Build.BinariesDirectory)\tcltk_lib_win32
106+
BuildForRelease: true
107+
SuppressMinGWLib: true
106108
107109
- script: |
108-
%MSBUILD% Tools\msi\bundle\releaselocal.wixproj /t:Rebuild /p:RebuildAll=true /p:BuildForRelease=true
109-
%MSBUILD% Tools\msi\bundle\releaseweb.wixproj /t:Rebuild /p:RebuildAll=false /p:BuildForRelease=true
110+
%MSBUILD% Tools\msi\bundle\releaselocal.wixproj /t:Rebuild /p:RebuildAll=true
111+
%MSBUILD% Tools\msi\bundle\releaseweb.wixproj /t:Rebuild /p:RebuildAll=false
110112
displayName: 'Build amd64 installer'
111113
env:
112114
Platform: x64
113115
Py_OutDir: $(Build.BinariesDirectory)
114116
PYTHON: $(Build.BinariesDirectory)\amd64\python.exe
115117
PYTHONHOME: $(Build.SourcesDirectory)
116118
TclTkLibraryDir: $(Build.BinariesDirectory)\tcltk_lib_amd64
119+
BuildForRelease: true
120+
SuppressMinGWLib: true
117121
118122
- task: CopyFiles@2
119123
displayName: 'Assemble artifact: msi (1/2)'

.azure-pipelines/windows-release/stage-build.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,9 @@ jobs:
9595
displayName: Python PGO build
9696
condition: and(succeeded(), eq(variables['DoPGO'], 'true'))
9797

98+
# Allow up to five hours for PGO
99+
timeoutInMinutes: 300
100+
98101
pool:
99102
name: 'Windows Release'
100103

.azure-pipelines/windows-release/stage-layout-embed.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
- powershell: >
4040
$(LayoutCmd)
4141
--copy "$(Build.ArtifactStagingDirectory)\layout"
42-
--zip "$(Build.ArtifactStagingDirectory)\embed\$(VersionText)-embed-$(Name).zip"
42+
--zip "$(Build.ArtifactStagingDirectory)\embed\python-$(VersionText)-embed-$(Name).zip"
4343
--preset-embed
4444
displayName: 'Generate embeddable layout'
4545

.azure-pipelines/windows-release/stage-test-embed.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ jobs:
2626
downloadPath: $(Build.BinariesDirectory)
2727

2828
- powershell: |
29-
Expand-Archive -Path "$(Build.BinariesDirectory)\embed\embed-$(Name).zip" -DestinationPath "$(Build.BinariesDirectory)\Python"
29+
$p = gi "$(Build.BinariesDirectory)\embed\python*embed-$(Name).zip"
30+
Expand-Archive -Path $p -DestinationPath "$(Build.BinariesDirectory)\Python"
3031
$p = gi "$(Build.BinariesDirectory)\Python\python.exe"
3132
Write-Host "##vso[task.prependpath]$(Split-Path -Parent $p)"
3233
displayName: 'Install Python and add to PATH'

Tools/msi/dev/dev.wixproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</PropertyGroup>
99
<Import Project="..\msi.props" />
1010
<PropertyGroup>
11-
<DefineConstants Condition="$(BuildForRelease)">
11+
<DefineConstants Condition="$(BuildForRelease) and $(SuppressMinGWLib) == ''">
1212
$(DefineConstants);
1313
IncludeMinGWLib=1;
1414
</DefineConstants>
@@ -35,7 +35,7 @@
3535
Inputs="$(BuildPath)$(PyDllName).dll"
3636
Outputs="$(BuildPath)lib$(PyDllName).a"
3737
AfterTargets="PrepareForBuild"
38-
Condition="$(BuildForRelease)">
38+
Condition="$(BuildForRelease) and $(SuppressMinGWLib) == ''">
3939
<!-- Build libpython##.a as part of this project. This requires gendef and dlltool on the path. -->
4040
<PropertyGroup>
4141
<_DllToolOpts>-m i386 --as-flags=--32</_DllToolOpts>

0 commit comments

Comments
 (0)