Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 45faf15

Browse files
authoredJan 28, 2022
bpo-33125: Enables building traditional installer for Windows ARM64 (pythonGH-30885)
Also makes a few general improvements to the build process and removes some dead code.
1 parent db77bcd commit 45faf15

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+334
-127
lines changed
 

‎.azure-pipelines/windows-release.yml

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ parameters:
3434
displayName: "Signature description"
3535
type: string
3636
default: 'Built: $(Build.BuildNumber)'
37+
- name: DoARM64
38+
displayName: "Publish ARM64 build"
39+
type: boolean
40+
default: true
3741
- name: DoPGO
3842
displayName: "Run PGO"
3943
type: boolean
@@ -64,25 +68,26 @@ parameters:
6468
default: '0'
6569

6670
variables:
67-
__RealSigningCertificate: 'Python Software Foundation'
68-
${{ if ne(parameters.GitRemote, '(Other)') }}:
69-
GitRemote: ${{ parameters.GitRemote }}
70-
${{ else }}:
71-
GitRemote: ${{ parameters.GitRemote_Other }}
72-
SourceTag: ${{ parameters.SourceTag }}
73-
DoPGO: ${{ parameters.DoPGO }}
74-
${{ if ne(parameters.SigningCertificate, 'Unsigned') }}:
75-
SigningCertificate: ${{ parameters.SigningCertificate }}
76-
SigningDescription: ${{ parameters.SigningDescription }}
77-
DoLayout: ${{ parameters.DoLayout }}
78-
DoMSIX: ${{ parameters.DoMSIX }}
79-
DoNuget: ${{ parameters.DoNuget }}
80-
DoEmbed: ${{ parameters.DoEmbed }}
81-
DoMSI: ${{ parameters.DoMSI }}
82-
DoPublish: ${{ parameters.DoPublish }}
71+
__RealSigningCertificate: 'Python Software Foundation'
72+
${{ if ne(parameters.GitRemote, '(Other)') }}:
73+
GitRemote: ${{ parameters.GitRemote }}
74+
${{ else }}:
75+
GitRemote: ${{ parameters.GitRemote_Other }}
76+
SourceTag: ${{ parameters.SourceTag }}
77+
DoPGO: ${{ parameters.DoPGO }}
78+
${{ if ne(parameters.SigningCertificate, 'Unsigned') }}:
79+
SigningCertificate: ${{ parameters.SigningCertificate }}
80+
SigningDescription: ${{ parameters.SigningDescription }}
81+
DoLayout: ${{ parameters.DoLayout }}
82+
DoMSIX: ${{ parameters.DoMSIX }}
83+
DoNuget: ${{ parameters.DoNuget }}
84+
DoEmbed: ${{ parameters.DoEmbed }}
85+
DoMSI: ${{ parameters.DoMSI }}
86+
DoPublish: ${{ parameters.DoPublish }}
87+
PublishARM64: ${{ parameters.DoARM64 }}
8388
# QUEUE TIME VARIABLES
84-
# PyDotOrgUsername: ''
85-
# PyDotOrgServer: ''
89+
# PyDotOrgUsername: ''
90+
# PyDotOrgServer: ''
8691

8792
trigger: none
8893
pr: none

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

Lines changed: 42 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,20 @@ steps:
4545
artifactName: bin_amd64_d
4646
targetPath: $(Build.BinariesDirectory)\amd64
4747

48+
- task: DownloadPipelineArtifact@1
49+
displayName: 'Download artifact: bin_arm64'
50+
condition: and(succeeded(), eq(variables['PublishARM64'], 'true'))
51+
inputs:
52+
artifactName: bin_arm64
53+
targetPath: $(Build.BinariesDirectory)\arm64
54+
55+
- task: DownloadPipelineArtifact@1
56+
displayName: 'Download artifact: bin_arm64_d'
57+
condition: and(succeeded(), eq(variables['PublishARM64'], 'true'))
58+
inputs:
59+
artifactName: bin_arm64_d
60+
targetPath: $(Build.BinariesDirectory)\arm64
61+
4862
- task: DownloadPipelineArtifact@1
4963
displayName: 'Download artifact: tcltk_lib_win32'
5064
inputs:
@@ -84,32 +98,45 @@ steps:
8498
8599
- script: |
86100
%MSBUILD% Tools\msi\bundle\releaselocal.wixproj /t:Rebuild /p:RebuildAll=true
87-
%MSBUILD% Tools\msi\bundle\releaseweb.wixproj /t:Rebuild /p:RebuildAll=false
88101
displayName: 'Build win32 installer'
89102
env:
90103
Platform: x86
91104
Py_OutDir: $(Build.BinariesDirectory)
92105
PYTHON: $(Build.BinariesDirectory)\win32\python.exe
106+
PythonForBuild: $(Build.BinariesDirectory)\win32\python.exe
93107
PYTHONHOME: $(Build.SourcesDirectory)
94108
TclTkLibraryDir: $(Build.BinariesDirectory)\tcltk_lib_win32
95109
BuildForRelease: true
96110
SuppressMinGWLib: true
97111
98112
- script: |
99113
%MSBUILD% Tools\msi\bundle\releaselocal.wixproj /t:Rebuild /p:RebuildAll=true
100-
%MSBUILD% Tools\msi\bundle\releaseweb.wixproj /t:Rebuild /p:RebuildAll=false
101114
displayName: 'Build amd64 installer'
102115
env:
103116
Platform: x64
104117
Py_OutDir: $(Build.BinariesDirectory)
105118
PYTHON: $(Build.BinariesDirectory)\amd64\python.exe
119+
PythonForBuild: $(Build.BinariesDirectory)\amd64\python.exe
106120
PYTHONHOME: $(Build.SourcesDirectory)
107121
TclTkLibraryDir: $(Build.BinariesDirectory)\tcltk_lib_amd64
108122
BuildForRelease: true
109123
SuppressMinGWLib: true
110124
125+
- script: |
126+
%MSBUILD% Tools\msi\bundle\releaselocal.wixproj /t:Rebuild /p:RebuildAll=true
127+
displayName: 'Build arm64 installer'
128+
condition: and(succeeded(), eq(variables['PublishARM64'], 'true'))
129+
env:
130+
Platform: ARM64
131+
Py_OutDir: $(Build.BinariesDirectory)
132+
PYTHON: $(Build.BinariesDirectory)\win32\python.exe
133+
PythonForBuild: $(Build.BinariesDirectory)\win32\python.exe
134+
PYTHONHOME: $(Build.SourcesDirectory)
135+
BuildForRelease: true
136+
SuppressMinGWLib: true
137+
111138
- task: CopyFiles@2
112-
displayName: 'Assemble artifact: msi (1/2)'
139+
displayName: 'Assemble artifact: msi (win32)'
113140
inputs:
114141
sourceFolder: $(Build.BinariesDirectory)\win32\en-us
115142
targetFolder: $(Build.ArtifactStagingDirectory)\msi\win32
@@ -119,7 +146,7 @@ steps:
119146
*.exe
120147
121148
- task: CopyFiles@2
122-
displayName: 'Assemble artifact: msi (2/2)'
149+
displayName: 'Assemble artifact: msi (amd64)'
123150
inputs:
124151
sourceFolder: $(Build.BinariesDirectory)\amd64\en-us
125152
targetFolder: $(Build.ArtifactStagingDirectory)\msi\amd64
@@ -128,6 +155,17 @@ steps:
128155
*.cab
129156
*.exe
130157
158+
- task: CopyFiles@2
159+
displayName: 'Assemble artifact: msi (arm64)'
160+
condition: and(succeeded(), eq(variables['PublishARM64'], 'true'))
161+
inputs:
162+
sourceFolder: $(Build.BinariesDirectory)\arm64\en-us
163+
targetFolder: $(Build.ArtifactStagingDirectory)\msi\arm64
164+
contents: |
165+
*.msi
166+
*.cab
167+
*.exe
168+
131169
- task: PublishPipelineArtifact@0
132170
displayName: 'Publish MSI'
133171
inputs:

0 commit comments

Comments
 (0)
Please sign in to comment.