mirror of
https://github.com/python/cpython.git
synced 2025-12-31 04:23:37 +00:00
bpo-33125: Enables building traditional installer for Windows ARM64 (GH-30885)
Also makes a few general improvements to the build process and removes some dead code.
This commit is contained in:
parent
db77bcd609
commit
45faf151c6
47 changed files with 334 additions and 127 deletions
|
|
@ -34,6 +34,10 @@ parameters:
|
|||
displayName: "Signature description"
|
||||
type: string
|
||||
default: 'Built: $(Build.BuildNumber)'
|
||||
- name: DoARM64
|
||||
displayName: "Publish ARM64 build"
|
||||
type: boolean
|
||||
default: true
|
||||
- name: DoPGO
|
||||
displayName: "Run PGO"
|
||||
type: boolean
|
||||
|
|
@ -64,25 +68,26 @@ parameters:
|
|||
default: '0'
|
||||
|
||||
variables:
|
||||
__RealSigningCertificate: 'Python Software Foundation'
|
||||
${{ if ne(parameters.GitRemote, '(Other)') }}:
|
||||
GitRemote: ${{ parameters.GitRemote }}
|
||||
${{ else }}:
|
||||
GitRemote: ${{ parameters.GitRemote_Other }}
|
||||
SourceTag: ${{ parameters.SourceTag }}
|
||||
DoPGO: ${{ parameters.DoPGO }}
|
||||
${{ if ne(parameters.SigningCertificate, 'Unsigned') }}:
|
||||
SigningCertificate: ${{ parameters.SigningCertificate }}
|
||||
SigningDescription: ${{ parameters.SigningDescription }}
|
||||
DoLayout: ${{ parameters.DoLayout }}
|
||||
DoMSIX: ${{ parameters.DoMSIX }}
|
||||
DoNuget: ${{ parameters.DoNuget }}
|
||||
DoEmbed: ${{ parameters.DoEmbed }}
|
||||
DoMSI: ${{ parameters.DoMSI }}
|
||||
DoPublish: ${{ parameters.DoPublish }}
|
||||
__RealSigningCertificate: 'Python Software Foundation'
|
||||
${{ if ne(parameters.GitRemote, '(Other)') }}:
|
||||
GitRemote: ${{ parameters.GitRemote }}
|
||||
${{ else }}:
|
||||
GitRemote: ${{ parameters.GitRemote_Other }}
|
||||
SourceTag: ${{ parameters.SourceTag }}
|
||||
DoPGO: ${{ parameters.DoPGO }}
|
||||
${{ if ne(parameters.SigningCertificate, 'Unsigned') }}:
|
||||
SigningCertificate: ${{ parameters.SigningCertificate }}
|
||||
SigningDescription: ${{ parameters.SigningDescription }}
|
||||
DoLayout: ${{ parameters.DoLayout }}
|
||||
DoMSIX: ${{ parameters.DoMSIX }}
|
||||
DoNuget: ${{ parameters.DoNuget }}
|
||||
DoEmbed: ${{ parameters.DoEmbed }}
|
||||
DoMSI: ${{ parameters.DoMSI }}
|
||||
DoPublish: ${{ parameters.DoPublish }}
|
||||
PublishARM64: ${{ parameters.DoARM64 }}
|
||||
# QUEUE TIME VARIABLES
|
||||
# PyDotOrgUsername: ''
|
||||
# PyDotOrgServer: ''
|
||||
# PyDotOrgUsername: ''
|
||||
# PyDotOrgServer: ''
|
||||
|
||||
trigger: none
|
||||
pr: none
|
||||
|
|
|
|||
|
|
@ -45,6 +45,20 @@ steps:
|
|||
artifactName: bin_amd64_d
|
||||
targetPath: $(Build.BinariesDirectory)\amd64
|
||||
|
||||
- task: DownloadPipelineArtifact@1
|
||||
displayName: 'Download artifact: bin_arm64'
|
||||
condition: and(succeeded(), eq(variables['PublishARM64'], 'true'))
|
||||
inputs:
|
||||
artifactName: bin_arm64
|
||||
targetPath: $(Build.BinariesDirectory)\arm64
|
||||
|
||||
- task: DownloadPipelineArtifact@1
|
||||
displayName: 'Download artifact: bin_arm64_d'
|
||||
condition: and(succeeded(), eq(variables['PublishARM64'], 'true'))
|
||||
inputs:
|
||||
artifactName: bin_arm64_d
|
||||
targetPath: $(Build.BinariesDirectory)\arm64
|
||||
|
||||
- task: DownloadPipelineArtifact@1
|
||||
displayName: 'Download artifact: tcltk_lib_win32'
|
||||
inputs:
|
||||
|
|
@ -84,12 +98,12 @@ steps:
|
|||
|
||||
- script: |
|
||||
%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
|
||||
Py_OutDir: $(Build.BinariesDirectory)
|
||||
PYTHON: $(Build.BinariesDirectory)\win32\python.exe
|
||||
PythonForBuild: $(Build.BinariesDirectory)\win32\python.exe
|
||||
PYTHONHOME: $(Build.SourcesDirectory)
|
||||
TclTkLibraryDir: $(Build.BinariesDirectory)\tcltk_lib_win32
|
||||
BuildForRelease: true
|
||||
|
|
@ -97,19 +111,32 @@ steps:
|
|||
|
||||
- script: |
|
||||
%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
|
||||
Py_OutDir: $(Build.BinariesDirectory)
|
||||
PYTHON: $(Build.BinariesDirectory)\amd64\python.exe
|
||||
PythonForBuild: $(Build.BinariesDirectory)\amd64\python.exe
|
||||
PYTHONHOME: $(Build.SourcesDirectory)
|
||||
TclTkLibraryDir: $(Build.BinariesDirectory)\tcltk_lib_amd64
|
||||
BuildForRelease: true
|
||||
SuppressMinGWLib: true
|
||||
|
||||
- script: |
|
||||
%MSBUILD% Tools\msi\bundle\releaselocal.wixproj /t:Rebuild /p:RebuildAll=true
|
||||
displayName: 'Build arm64 installer'
|
||||
condition: and(succeeded(), eq(variables['PublishARM64'], 'true'))
|
||||
env:
|
||||
Platform: ARM64
|
||||
Py_OutDir: $(Build.BinariesDirectory)
|
||||
PYTHON: $(Build.BinariesDirectory)\win32\python.exe
|
||||
PythonForBuild: $(Build.BinariesDirectory)\win32\python.exe
|
||||
PYTHONHOME: $(Build.SourcesDirectory)
|
||||
BuildForRelease: true
|
||||
SuppressMinGWLib: true
|
||||
|
||||
- task: CopyFiles@2
|
||||
displayName: 'Assemble artifact: msi (1/2)'
|
||||
displayName: 'Assemble artifact: msi (win32)'
|
||||
inputs:
|
||||
sourceFolder: $(Build.BinariesDirectory)\win32\en-us
|
||||
targetFolder: $(Build.ArtifactStagingDirectory)\msi\win32
|
||||
|
|
@ -119,7 +146,7 @@ steps:
|
|||
*.exe
|
||||
|
||||
- task: CopyFiles@2
|
||||
displayName: 'Assemble artifact: msi (2/2)'
|
||||
displayName: 'Assemble artifact: msi (amd64)'
|
||||
inputs:
|
||||
sourceFolder: $(Build.BinariesDirectory)\amd64\en-us
|
||||
targetFolder: $(Build.ArtifactStagingDirectory)\msi\amd64
|
||||
|
|
@ -128,6 +155,17 @@ steps:
|
|||
*.cab
|
||||
*.exe
|
||||
|
||||
- task: CopyFiles@2
|
||||
displayName: 'Assemble artifact: msi (arm64)'
|
||||
condition: and(succeeded(), eq(variables['PublishARM64'], 'true'))
|
||||
inputs:
|
||||
sourceFolder: $(Build.BinariesDirectory)\arm64\en-us
|
||||
targetFolder: $(Build.ArtifactStagingDirectory)\msi\arm64
|
||||
contents: |
|
||||
*.msi
|
||||
*.cab
|
||||
*.exe
|
||||
|
||||
- task: PublishPipelineArtifact@0
|
||||
displayName: 'Publish MSI'
|
||||
inputs:
|
||||
|
|
|
|||
|
|
@ -36,9 +36,9 @@ jobs:
|
|||
|
||||
|
||||
- powershell: 'gci pythonarm*.nupkg | %{ Write-Host "Not publishing: $($_.Name)"; gi $_ } | del'
|
||||
displayName: 'Prevent publishing ARM/ARM64 packages'
|
||||
displayName: 'Prevent publishing ARM64 packages'
|
||||
workingDirectory: '$(Build.BinariesDirectory)\nuget'
|
||||
condition: and(succeeded(), not(variables['PublishArmPackages']))
|
||||
condition: and(succeeded(), eq(variables['PublishARM64'], 'true'))
|
||||
|
||||
- task: NuGetCommand@2
|
||||
displayName: Push packages
|
||||
|
|
|
|||
|
|
@ -77,10 +77,11 @@ jobs:
|
|||
downloadPath: $(Build.BinariesDirectory)
|
||||
|
||||
|
||||
# Note that ARM64 MSIs are skipped at build when this option is specified
|
||||
- powershell: 'gci *embed-arm*.zip | %{ Write-Host "Not publishing: $($_.Name)"; gi $_ } | del'
|
||||
displayName: 'Prevent publishing ARM/ARM64 packages'
|
||||
displayName: 'Prevent publishing ARM64 packages'
|
||||
workingDirectory: '$(Build.BinariesDirectory)\embed'
|
||||
condition: and(succeeded(), not(variables['PublishArmPackages']))
|
||||
condition: and(succeeded(), eq(variables['PublishARM64'], 'true'))
|
||||
|
||||
|
||||
- template: ./gpg-sign.yml
|
||||
|
|
|
|||
|
|
@ -11,19 +11,19 @@ jobs:
|
|||
strategy:
|
||||
matrix:
|
||||
win32_User:
|
||||
ExeMatch: 'python-[\dabrc.]+-webinstall\.exe'
|
||||
ExeMatch: 'python-[\dabrc.]+\.exe'
|
||||
Logs: $(Build.ArtifactStagingDirectory)\logs\win32_User
|
||||
InstallAllUsers: 0
|
||||
win32_Machine:
|
||||
ExeMatch: 'python-[\dabrc.]+-webinstall\.exe'
|
||||
ExeMatch: 'python-[\dabrc.]+\.exe'
|
||||
Logs: $(Build.ArtifactStagingDirectory)\logs\win32_Machine
|
||||
InstallAllUsers: 1
|
||||
amd64_User:
|
||||
ExeMatch: 'python-[\dabrc.]+-amd64-webinstall\.exe'
|
||||
ExeMatch: 'python-[\dabrc.]+-amd64\.exe'
|
||||
Logs: $(Build.ArtifactStagingDirectory)\logs\amd64_User
|
||||
InstallAllUsers: 0
|
||||
amd64_Machine:
|
||||
ExeMatch: 'python-[\dabrc.]+-amd64-webinstall\.exe'
|
||||
ExeMatch: 'python-[\dabrc.]+-amd64\.exe'
|
||||
Logs: $(Build.ArtifactStagingDirectory)\logs\amd64_Machine
|
||||
InstallAllUsers: 1
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue