Skip to content

Commit 7bf6445

Browse files
Merge branch 'master' into fix-issue24255
* master: (599 commits) Docs: Improved phrasing (pythonGH-14069) Remove redundant if check from optional argument function in argparse. (pythonGH-8766) bpo-37289: Add a test for if with ifexpr in the peephole optimiser to detect regressions (pythonGH-14127) Update What's New in Python 3.9 (pythonGH-14253) bpo-36511: Improve ARM32 buildbot scripts (pythonGH-14251) bpo-37151: remove _PyCFunction_FastCallDict (pythonGH-14269) Fix typo, 'widger' -> 'widget', in idlelib/tree.py (pythonGH-14263) Fix bpo number in News file. (pythonGH-14260) bpo-37342: Fix the incorrect nb_index's type in typeobj documentation (pythonGH-14241) Update What's New in Python 3.8 (pythonGH-14239) bpo-36710: Use tstate in pylifecycle.c (pythonGH-14249) Add missing single quote in io.TextIOWrapper.reconfigure documentation (pythonGH-14246) bpo-36511: Add buildbot scripts and fix tests for Windows ARM32 buildbot (pythonGH-13454) bpo-37333: Ensure IncludeTkinter has a value (pythonGH-14240) bpo-37331: Clarify format of socket handler messages in the documentation. (pythonGH-14234) bpo-37258: Not a bug, but added a unit test and updated documentation. (pythonGH-14229) bpo-36710: Remove PyImport_Cleanup() function (pythonGH-14221) Fix name of '\0'. (pythonGH-14222) bpo-36710: Add tstate parameter in import.c (pythonGH-14218) Document typing.ForwardRef (pythonGH-14216) ...
2 parents 5c9062d + d006800 commit 7bf6445

File tree

1,076 files changed

+64958
-18640
lines changed

Some content is hidden

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

1,076 files changed

+64958
-18640
lines changed

.azure-pipelines/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
variables:
6060
testRunTitle: '$(build.sourceBranchName)-linux'
6161
testRunPlatform: linux
62-
openssl_version: 1.1.0j
62+
openssl_version: 1.1.1c
6363

6464
steps:
6565
- template: ./posix-steps.yml
@@ -116,7 +116,7 @@ jobs:
116116
variables:
117117
testRunTitle: '$(Build.SourceBranchName)-linux-coverage'
118118
testRunPlatform: linux-coverage
119-
openssl_version: 1.1.0j
119+
openssl_version: 1.1.1c
120120

121121
steps:
122122
- template: ./posix-steps.yml

.azure-pipelines/docs-steps.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ steps:
1212
inputs:
1313
versionSpec: '>=3.6'
1414

15-
- script: python -m pip install sphinx==1.8.2 blurb python-docs-theme
15+
- script: python -m pip install sphinx==2.0.1 blurb python-docs-theme
1616
displayName: 'Install build dependencies'
1717

1818
- ${{ if ne(parameters.latex, 'true') }}:

.azure-pipelines/pr.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
variables:
6060
testRunTitle: '$(system.pullRequest.TargetBranch)-linux'
6161
testRunPlatform: linux
62-
openssl_version: 1.1.0j
62+
openssl_version: 1.1.1c
6363

6464
steps:
6565
- template: ./posix-steps.yml
@@ -116,7 +116,7 @@ jobs:
116116
variables:
117117
testRunTitle: '$(Build.SourceBranchName)-linux-coverage'
118118
testRunPlatform: linux-coverage
119-
openssl_version: 1.1.0j
119+
openssl_version: 1.1.1c
120120

121121
steps:
122122
- template: ./posix-steps.yml

.azure-pipelines/windows-release.yml

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
name: Release_$(Build.SourceBranchName)_$(SourceTag)_$(Date:yyyyMMdd)$(Rev:.rr)
2+
3+
# QUEUE TIME VARIABLES
4+
# variables:
5+
# GitRemote: python
6+
# SourceTag:
7+
# DoPGO: true
8+
# SigningCertificate: 'Python Software Foundation'
9+
# SigningDescription: 'Built: $(Build.BuildNumber)'
10+
# DoLayout: true
11+
# DoMSIX: true
12+
# DoNuget: true
13+
# DoEmbed: true
14+
# DoMSI: true
15+
# DoPublish: false
16+
17+
trigger: none
18+
pr: none
19+
20+
stages:
21+
- stage: Build
22+
displayName: Build binaries
23+
jobs:
24+
- template: windows-release/stage-build.yml
25+
26+
- stage: Sign
27+
displayName: Sign binaries
28+
dependsOn: Build
29+
jobs:
30+
- template: windows-release/stage-sign.yml
31+
32+
- stage: Layout
33+
displayName: Generate layouts
34+
dependsOn: Sign
35+
jobs:
36+
- template: windows-release/stage-layout-full.yml
37+
- template: windows-release/stage-layout-embed.yml
38+
- template: windows-release/stage-layout-nuget.yml
39+
40+
- stage: Pack
41+
dependsOn: Layout
42+
jobs:
43+
- template: windows-release/stage-pack-nuget.yml
44+
45+
- stage: Test
46+
dependsOn: Pack
47+
jobs:
48+
- template: windows-release/stage-test-embed.yml
49+
- template: windows-release/stage-test-nuget.yml
50+
51+
- stage: Layout_MSIX
52+
displayName: Generate MSIX layouts
53+
dependsOn: Sign
54+
condition: and(succeeded(), eq(variables['DoMSIX'], 'true'))
55+
jobs:
56+
- template: windows-release/stage-layout-msix.yml
57+
58+
- stage: Pack_MSIX
59+
displayName: Package MSIX
60+
dependsOn: Layout_MSIX
61+
jobs:
62+
- template: windows-release/stage-pack-msix.yml
63+
64+
- stage: Build_MSI
65+
displayName: Build MSI installer
66+
dependsOn: Sign
67+
condition: and(succeeded(), eq(variables['DoMSI'], 'true'))
68+
jobs:
69+
- template: windows-release/stage-msi.yml
70+
71+
- stage: Test_MSI
72+
displayName: Test MSI installer
73+
dependsOn: Build_MSI
74+
jobs:
75+
- template: windows-release/stage-test-msi.yml
76+
77+
- stage: PublishPyDotOrg
78+
displayName: Publish to python.org
79+
dependsOn: ['Test_MSI', 'Test']
80+
condition: and(succeeded(), eq(variables['DoPublish'], 'true'))
81+
jobs:
82+
- template: windows-release/stage-publish-pythonorg.yml
83+
84+
- stage: PublishNuget
85+
displayName: Publish to nuget.org
86+
dependsOn: Test
87+
condition: and(succeeded(), eq(variables['DoPublish'], 'true'))
88+
jobs:
89+
- template: windows-release/stage-publish-nugetorg.yml
90+
91+
- stage: PublishStore
92+
displayName: Publish to Store
93+
dependsOn: Pack_MSIX
94+
condition: and(succeeded(), eq(variables['DoPublish'], 'true'))
95+
jobs:
96+
- template: windows-release/stage-publish-store.yml
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
parameters:
2+
ShouldPGO: false
3+
4+
steps:
5+
- template: ./checkout.yml
6+
7+
- powershell: |
8+
$d = (.\PCbuild\build.bat -V) | %{ if($_ -match '\s+(\w+):\s*(.+)\s*$') { @{$Matches[1] = $Matches[2];} }};
9+
Write-Host "##vso[task.setvariable variable=VersionText]$($d.PythonVersion)"
10+
Write-Host "##vso[task.setvariable variable=VersionNumber]$($d.PythonVersionNumber)"
11+
Write-Host "##vso[task.setvariable variable=VersionHex]$($d.PythonVersionHex)"
12+
Write-Host "##vso[task.setvariable variable=VersionUnique]$($d.PythonVersionUnique)"
13+
Write-Host "##vso[build.addbuildtag]$($d.PythonVersion)"
14+
Write-Host "##vso[build.addbuildtag]$($d.PythonVersion)-$(Name)"
15+
displayName: 'Extract version numbers'
16+
17+
- ${{ if eq(parameters.ShouldPGO, 'false') }}:
18+
- powershell: |
19+
$env:SigningCertificate = $null
20+
.\PCbuild\build.bat -v -p $(Platform) -c $(Configuration)
21+
displayName: 'Run build'
22+
env:
23+
IncludeUwp: true
24+
Py_OutDir: '$(Build.BinariesDirectory)\bin'
25+
26+
- ${{ if eq(parameters.ShouldPGO, 'true') }}:
27+
- powershell: |
28+
$env:SigningCertificate = $null
29+
.\PCbuild\build.bat -v -p $(Platform) --pgo
30+
displayName: 'Run build with PGO'
31+
env:
32+
IncludeUwp: true
33+
Py_OutDir: '$(Build.BinariesDirectory)\bin'
34+
35+
- powershell: |
36+
$kitroot = (gp 'HKLM:\SOFTWARE\Microsoft\Windows Kits\Installed Roots\').KitsRoot10
37+
$tool = (gci -r "$kitroot\Bin\*\x64\signtool.exe" | sort FullName -Desc | select -First 1)
38+
if (-not $tool) {
39+
throw "SDK is not available"
40+
}
41+
Write-Host "##vso[task.prependpath]$($tool.Directory)"
42+
displayName: 'Add WinSDK tools to path'
43+
44+
- powershell: |
45+
$env:SigningCertificate = $null
46+
.\python.bat PC\layout -vv -t "$(Build.BinariesDirectory)\catalog" --catalog "${env:CAT}.cdf" --preset-default
47+
makecat "${env:CAT}.cdf"
48+
del "${env:CAT}.cdf"
49+
if (-not (Test-Path "${env:CAT}.cat")) {
50+
throw "Failed to build catalog file"
51+
}
52+
displayName: 'Generate catalog'
53+
env:
54+
CAT: $(Build.BinariesDirectory)\bin\$(Arch)\python
55+
56+
- task: PublishPipelineArtifact@0
57+
displayName: 'Publish binaries'
58+
condition: and(succeeded(), not(and(eq(variables['Configuration'], 'Release'), variables['SigningCertificate'])))
59+
inputs:
60+
targetPath: '$(Build.BinariesDirectory)\bin\$(Arch)'
61+
artifactName: bin_$(Name)
62+
63+
- task: PublishPipelineArtifact@0
64+
displayName: 'Publish binaries for signing'
65+
condition: and(succeeded(), and(eq(variables['Configuration'], 'Release'), variables['SigningCertificate']))
66+
inputs:
67+
targetPath: '$(Build.BinariesDirectory)\bin\$(Arch)'
68+
artifactName: unsigned_bin_$(Name)
69+
70+
- task: CopyFiles@2
71+
displayName: 'Layout Artifact: symbols'
72+
inputs:
73+
sourceFolder: $(Build.BinariesDirectory)\bin\$(Arch)
74+
targetFolder: $(Build.ArtifactStagingDirectory)\symbols\$(Name)
75+
flatten: true
76+
contents: |
77+
**\*.pdb
78+
79+
- task: PublishBuildArtifacts@1
80+
displayName: 'Publish Artifact: symbols'
81+
inputs:
82+
PathToPublish: '$(Build.ArtifactStagingDirectory)\symbols'
83+
ArtifactName: symbols
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
parameters:
2+
depth: 3
3+
4+
steps:
5+
- checkout: none
6+
7+
- script: git clone --progress -v --depth ${{ parameters.depth }} --branch $(SourceTag) --single-branch https://github.com/$(GitRemote)/cpython.git .
8+
displayName: 'git clone ($(GitRemote)/$(SourceTag))'
9+
condition: and(succeeded(), and(variables['GitRemote'], variables['SourceTag']))
10+
11+
- script: git clone --progress -v --depth ${{ parameters.depth }} --branch $(SourceTag) --single-branch $(Build.Repository.Uri) .
12+
displayName: 'git clone (<default>/$(SourceTag))'
13+
condition: and(succeeded(), and(not(variables['GitRemote']), variables['SourceTag']))
14+
15+
- script: git clone --progress -v --depth ${{ parameters.depth }} --branch $(Build.SourceBranchName) --single-branch https://github.com/$(GitRemote)/cpython.git .
16+
displayName: 'git clone ($(GitRemote)/<default>)'
17+
condition: and(succeeded(), and(variables['GitRemote'], not(variables['SourceTag'])))
18+
19+
- script: git clone --progress -v --depth ${{ parameters.depth }} --branch $(Build.SourceBranchName) --single-branch $(Build.Repository.Uri) .
20+
displayName: 'git clone'
21+
condition: and(succeeded(), and(not(variables['GitRemote']), not(variables['SourceTag'])))
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Locate the Windows SDK and add its binaries directory to PATH
2+
#
3+
# `toolname` can be overridden to use a different marker file.
4+
5+
parameters:
6+
toolname: signtool.exe
7+
8+
steps:
9+
- powershell: |
10+
$kitroot = (gp 'HKLM:\SOFTWARE\Microsoft\Windows Kits\Installed Roots\').KitsRoot10
11+
$tool = (gci -r "$kitroot\Bin\*\${{ parameters.toolname }}" | sort FullName -Desc | select -First 1)
12+
if (-not $tool) {
13+
throw "SDK is not available"
14+
}
15+
Write-Host "##vso[task.prependpath]$($tool.Directory)"
16+
Write-Host "Adding $($tool.Directory) to PATH"
17+
displayName: 'Add WinSDK tools to path'
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
steps:
2+
- powershell: >
3+
Write-Host (
4+
'##vso[task.setvariable variable=LayoutCmd]&
5+
"{0}\bin\python.exe"
6+
"{1}\PC\layout"
7+
-vv
8+
--source "{1}"
9+
--build "{0}\bin"
10+
--temp "{0}\layout-temp"
11+
--include-cat "{0}\bin\python.cat"
12+
--doc-build "{0}\doc"'
13+
-f ("$(Build.BinariesDirectory)", "$(Build.SourcesDirectory)")
14+
)
15+
displayName: 'Set LayoutCmd'
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
parameters:
2+
DllToolOpt: -m i386:x86-64
3+
#DllToolOpt: -m i386 --as-flags=--32
4+
5+
steps:
6+
- powershell: |
7+
git clone https://github.com/python/cpython-bin-deps --branch binutils --single-branch --depth 1 --progress -v "binutils"
8+
gci "bin\$(Arch)\python*.dll" | %{
9+
& "binutils\gendef.exe" $_ | Out-File -Encoding ascii tmp.def
10+
& "binutils\dlltool.exe" --dllname $($_.BaseName).dll --def tmp.def --output-lib "$($_.Directory)\lib$($_.BaseName).a" ${{ parameters.DllToolOpt }}
11+
}
12+
displayName: 'Generate MinGW import library'
13+
workingDirectory: $(Build.BinariesDirectory)

0 commit comments

Comments
 (0)