Skip to content

Commit adff1f0

Browse files
committed
Merge branch 'main' into select-poll-timeout-docstrings
Signed-off-by: Tal Einat <[email protected]>
2 parents 6f86628 + 30fb6d0 commit adff1f0

File tree

2,181 files changed

+261920
-133652
lines changed

Some content is hidden

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

2,181 files changed

+261920
-133652
lines changed

.azure-pipelines/ci.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
variables:
22
coverage: false
33

4-
trigger: ['master', '3.9', '3.8', '3.7']
4+
trigger: ['main', '3.10', '3.9', '3.8', '3.7']
55

66
jobs:
77
- job: Prebuild
88
displayName: Pre-build checks
99

1010
pool:
11-
vmImage: ubuntu-18.04
11+
vmImage: ubuntu-20.04
1212

1313
steps:
1414
- template: ./prebuild-checks.yml
@@ -20,7 +20,7 @@ jobs:
2020
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['docs.run'], 'true'))
2121

2222
pool:
23-
vmImage: ubuntu-18.04
23+
vmImage: ubuntu-20.04
2424

2525
steps:
2626
- template: ./docs-steps.yml
@@ -40,7 +40,7 @@ jobs:
4040
testRunPlatform: macos
4141

4242
pool:
43-
vmImage: macos-10.14
43+
vmImage: macos-10.15
4444

4545
steps:
4646
- template: ./macos-steps.yml
@@ -52,12 +52,12 @@ jobs:
5252
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))
5353

5454
pool:
55-
vmImage: ubuntu-18.04
55+
vmImage: ubuntu-20.04
5656

5757
variables:
5858
testRunTitle: '$(build.sourceBranchName)-linux'
5959
testRunPlatform: linux
60-
openssl_version: 1.1.1g
60+
openssl_version: 1.1.1m
6161

6262
steps:
6363
- template: ./posix-steps.yml
@@ -78,12 +78,12 @@ jobs:
7878
)
7979
8080
pool:
81-
vmImage: ubuntu-18.04
81+
vmImage: ubuntu-20.04
8282

8383
variables:
8484
testRunTitle: '$(Build.SourceBranchName)-linux-coverage'
8585
testRunPlatform: linux-coverage
86-
openssl_version: 1.1.1g
86+
openssl_version: 1.1.1m
8787

8888
steps:
8989
- template: ./posix-steps.yml

.azure-pipelines/docs-steps.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@ steps:
1212
inputs:
1313
versionSpec: '>=3.6'
1414

15-
- script: python -m pip install sphinx==2.2.0 blurb python-docs-theme
15+
- script: python -m pip install -r requirements.txt
16+
workingDirectory: '$(build.sourcesDirectory)/Doc'
1617
displayName: 'Install build dependencies'
1718

1819
- ${{ if ne(parameters.latex, 'true') }}:
19-
- script: make check suspicious html PYTHON=python
20+
- script: make check html PYTHON=python
2021
workingDirectory: '$(build.sourcesDirectory)/Doc'
2122
displayName: 'Build documentation'
2223

@@ -31,7 +32,7 @@ steps:
3132
- ${{ if eq(parameters.upload, 'true') }}:
3233
- task: PublishBuildArtifacts@1
3334
displayName: 'Publish docs'
34-
35+
3536
inputs:
3637
PathToPublish: '$(build.sourcesDirectory)/Doc/build'
3738
ArtifactName: docs

.azure-pipelines/find-tools.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Locate a set of the tools used for builds
2+
3+
steps:
4+
- template: windows-release/find-sdk.yml
5+
parameters:
6+
toolname: 'signtool.exe'
7+
8+
- powershell: |
9+
$vcvarsall = (& "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" `
10+
-prerelease `
11+
-latest `
12+
-requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 `
13+
-find VC\Auxiliary\Build\vcvarsall.bat)
14+
Write-Host "Found vcvarsall at $vcvarsall"
15+
Write-Host "##vso[task.setVariable variable=vcvarsall]$vcvarsall"
16+
displayName: 'Find vcvarsall.bat'
17+
18+
- powershell: |
19+
$msbuild = (& "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" `
20+
-prerelease `
21+
-latest `
22+
-requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 `
23+
-find MSBuild\Current\Bin\msbuild.exe)
24+
Write-Host "Found MSBuild at $msbuild"
25+
Write-Host "##vso[task.setVariable variable=msbuild]$msbuild"
26+
displayName: 'Find MSBuild'

.azure-pipelines/libffi-build.yml

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
name: $(SourceTag)_$(Date:yyyyMMdd)$(Rev:.rr)
2+
3+
variables:
4+
IntDir: '$(Build.BinariesDirectory)'
5+
OutDir: '$(Build.ArtifactStagingDirectory)'
6+
7+
# MUST BE SET AT QUEUE TIME
8+
# SigningCertificate: 'Python Software Foundation'
9+
# SourcesRepo: 'https://github.com/python/cpython-source-deps'
10+
# SourceTag: 'libffi-3.4.2'
11+
12+
jobs:
13+
- job: Build_LibFFI
14+
displayName: LibFFI
15+
pool:
16+
vmImage: windows-latest
17+
18+
workspace:
19+
clean: all
20+
21+
steps:
22+
- checkout: none
23+
24+
- template: ./find-tools.yml
25+
26+
- powershell: |
27+
mkdir -Force "$(IntDir)\script"
28+
iwr "https://github.com/python/cpython/raw/main/PCbuild/prepare_libffi.bat" `
29+
-outfile "$(IntDir)\script\prepare_libffi.bat"
30+
displayName: 'Download build script'
31+
32+
- powershell: |
33+
git clone $(SourcesRepo) -b $(SourceTag) --depth 1 -c core.autocrlf=false -c core.eol=lf .
34+
displayName: 'Check out LibFFI sources'
35+
36+
- script: 'prepare_libffi.bat --install-cygwin'
37+
workingDirectory: '$(IntDir)\script'
38+
displayName: 'Install Cygwin and build'
39+
env:
40+
VCVARSALL: '$(vcvarsall)'
41+
LIBFFI_SOURCE: '$(Build.SourcesDirectory)'
42+
LIBFFI_OUT: '$(OutDir)'
43+
44+
- powershell: |
45+
if ((gci *\*.dll).Count -lt 4) {
46+
Write-Error "Did not generate enough DLL files"
47+
}
48+
if ((gci *\Include\ffi.h).Count -lt 4) {
49+
Write-Error "Did not generate enough include files"
50+
}
51+
failOnStderr: true
52+
workingDirectory: '$(OutDir)'
53+
displayName: 'Verify files were created'
54+
55+
- publish: '$(OutDir)'
56+
artifact: 'unsigned'
57+
displayName: 'Publish unsigned build'
58+
59+
- job: Sign_LibFFI
60+
displayName: Sign LibFFI
61+
dependsOn: Build_LibFFI
62+
pool:
63+
name: 'Windows Release'
64+
65+
workspace:
66+
clean: all
67+
68+
steps:
69+
- checkout: none
70+
- download: current
71+
artifact: unsigned
72+
73+
- template: ./find-tools.yml
74+
75+
- powershell: |
76+
signtool sign /q /a `
77+
/n "Python Software Foundation" `
78+
/fd sha256 `
79+
/tr http://timestamp.digicert.com/ /td sha256 `
80+
/d "LibFFI for Python" `
81+
(gci "$(Pipeline.Workspace)\unsigned\*.dll" -r)
82+
displayName: 'Sign files'
83+
84+
- publish: '$(Pipeline.Workspace)\unsigned'
85+
artifact: 'libffi'
86+
displayName: 'Publish libffi'

.azure-pipelines/openssl-build.yml

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
name: $(SourceTag)_$(Date:yyyyMMdd)$(Rev:.rr)
2+
3+
variables:
4+
IntDir: '$(Build.BinariesDirectory)'
5+
OutDir: '$(Build.ArtifactStagingDirectory)'
6+
7+
# MUST BE SET AT QUEUE TIME
8+
# SigningCertificate: 'Python Software Foundation'
9+
# SourcesRepo: 'https://github.com/python/cpython-source-deps'
10+
# SourceTag: 'openssl-1.1.1k'
11+
12+
jobs:
13+
- job: Build_SSL
14+
displayName: OpenSSL
15+
pool:
16+
name: 'Windows Release'
17+
#vmImage: windows-latest
18+
19+
strategy:
20+
matrix:
21+
win32:
22+
Platform: 'win32'
23+
VCPlatform: 'amd64_x86'
24+
OpenSSLPlatform: 'VC-WIN32 no-asm'
25+
amd64:
26+
Platform: 'amd64'
27+
VCPlatform: 'amd64'
28+
OpenSSLPlatform: 'VC-WIN64A-masm'
29+
arm32:
30+
Platform: 'arm32'
31+
VCPlatform: 'amd64_arm'
32+
OpenSSLPlatform: 'VC-WIN32-ARM'
33+
arm64:
34+
Platform: 'arm64'
35+
VCPlatform: 'amd64_arm64'
36+
OpenSSLPlatform: 'VC-WIN64-ARM'
37+
38+
workspace:
39+
clean: all
40+
41+
steps:
42+
- checkout: none
43+
44+
- template: ./find-tools.yml
45+
46+
- powershell: |
47+
git clone $(SourcesRepo) -b $(SourceTag) --depth 1 .
48+
displayName: 'Check out OpenSSL sources'
49+
50+
- powershell: |
51+
$f = gi ms\uplink.c
52+
$c1 = gc $f
53+
$c2 = $c1 -replace '\(\(h = GetModuleHandle\(NULL\)\) == NULL\)', '((h = GetModuleHandleA("_ssl.pyd")) == NULL) if ((h = GetModuleHandleA("_ssl_d.pyd")) == NULL) if ((h = GetModuleHandle(NULL)) == NULL /*patched*/)'
54+
if ($c2 -ne $c1) {
55+
$c2 | Out-File $f -Encoding ASCII
56+
} else {
57+
Write-Host '##warning Failed to patch uplink.c'
58+
}
59+
displayName: 'Apply uplink.c patch'
60+
61+
- script: |
62+
call "$(vcvarsall)" $(VCPlatform)
63+
perl "$(Build.SourcesDirectory)\Configure" $(OpenSSLPlatform)
64+
nmake
65+
workingDirectory: '$(IntDir)'
66+
displayName: 'Build OpenSSL'
67+
68+
- script: |
69+
call "$(vcvarsall)" $(VCPlatform)
70+
signtool sign /q /a /n "$(SigningCertificate)" /fd sha256 /tr http://timestamp.digicert.com/ /td sha256 /d "OpenSSL for Python" *.dll
71+
workingDirectory: '$(IntDir)'
72+
displayName: 'Sign OpenSSL Build'
73+
condition: and(succeeded(), variables['SigningCertificate'])
74+
75+
- task: CopyFiles@2
76+
displayName: 'Copy built libraries for upload'
77+
inputs:
78+
SourceFolder: '$(IntDir)'
79+
Contents: |
80+
lib*.dll
81+
lib*.pdb
82+
lib*.lib
83+
include\openssl\*.h
84+
TargetFolder: '$(OutDir)'
85+
86+
- task: CopyFiles@2
87+
displayName: 'Copy header files for upload'
88+
inputs:
89+
SourceFolder: '$(Build.SourcesDirectory)'
90+
Contents: |
91+
include\openssl\*
92+
TargetFolder: '$(OutDir)'
93+
94+
- task: CopyFiles@2
95+
displayName: 'Copy applink files for upload'
96+
inputs:
97+
SourceFolder: '$(Build.SourcesDirectory)\ms'
98+
Contents: applink.c
99+
TargetFolder: '$(OutDir)\include'
100+
101+
- task: CopyFiles@2
102+
displayName: 'Copy LICENSE for upload'
103+
inputs:
104+
SourceFolder: '$(Build.SourcesDirectory)'
105+
Contents: LICENSE
106+
TargetFolder: '$(OutDir)'
107+
108+
- publish: '$(OutDir)'
109+
artifact: '$(Platform)'
110+
displayName: 'Publishing $(Platform)'

.azure-pipelines/posix-steps.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ steps:
6666
COMMAND: make
6767

6868
- ${{ if eq(parameters.patchcheck, 'true') }}:
69-
- script: ./python Tools/scripts/patchcheck.py --travis true
69+
- script: ./python Tools/scripts/patchcheck.py --ci true
7070
displayName: 'Run patchcheck.py'
7171
condition: and(succeeded(), eq(variables['Build.Reason'], 'PullRequest'))
7272

.azure-pipelines/pr.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
variables:
22
coverage: false
33

4-
pr: ['master', '3.9', '3.8', '3.7']
4+
pr: ['main', '3.10', '3.9', '3.8', '3.7']
55

66
jobs:
77
- job: Prebuild
88
displayName: Pre-build checks
99

1010
pool:
11-
vmImage: ubuntu-18.04
11+
vmImage: ubuntu-20.04
1212

1313
steps:
1414
- template: ./prebuild-checks.yml
@@ -20,7 +20,7 @@ jobs:
2020
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['docs.run'], 'true'))
2121

2222
pool:
23-
vmImage: ubuntu-18.04
23+
vmImage: ubuntu-20.04
2424

2525
steps:
2626
- template: ./docs-steps.yml
@@ -38,7 +38,7 @@ jobs:
3838
testRunPlatform: macos
3939

4040
pool:
41-
vmImage: macos-10.14
41+
vmImage: macos-10.15
4242

4343
steps:
4444
- template: ./macos-steps.yml
@@ -52,12 +52,12 @@ jobs:
5252
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))
5353

5454
pool:
55-
vmImage: ubuntu-18.04
55+
vmImage: ubuntu-20.04
5656

5757
variables:
5858
testRunTitle: '$(system.pullRequest.TargetBranch)-linux'
5959
testRunPlatform: linux
60-
openssl_version: 1.1.1g
60+
openssl_version: 1.1.1m
6161

6262
steps:
6363
- template: ./posix-steps.yml
@@ -78,12 +78,12 @@ jobs:
7878
)
7979
8080
pool:
81-
vmImage: ubuntu-18.04
81+
vmImage: ubuntu-20.04
8282

8383
variables:
8484
testRunTitle: '$(Build.SourceBranchName)-linux-coverage'
8585
testRunPlatform: linux-coverage
86-
openssl_version: 1.1.1g
86+
openssl_version: 1.1.1m
8787

8888
steps:
8989
- template: ./posix-steps.yml

0 commit comments

Comments
 (0)