Skip to content

Commit 68d0359

Browse files
Merge branch 'main' into fix-issue-43633
2 parents ec15df5 + 20490d5 commit 68d0359

File tree

1,975 files changed

+136379
-92890
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,975 files changed

+136379
-92890
lines changed

.azure-pipelines/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
variables:
5858
testRunTitle: '$(build.sourceBranchName)-linux'
5959
testRunPlatform: linux
60-
openssl_version: 1.1.1l
60+
openssl_version: 1.1.1n
6161

6262
steps:
6363
- template: ./posix-steps.yml
@@ -83,7 +83,7 @@ jobs:
8383
variables:
8484
testRunTitle: '$(Build.SourceBranchName)-linux-coverage'
8585
testRunPlatform: linux-coverage
86-
openssl_version: 1.1.1l
86+
openssl_version: 1.1.1n
8787

8888
steps:
8989
- template: ./posix-steps.yml
@@ -98,7 +98,7 @@ jobs:
9898
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))
9999

100100
pool:
101-
vmImage: windows-2019
101+
vmImage: windows-2022
102102

103103
strategy:
104104
matrix:

.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: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@ steps:
6666
COMMAND: make
6767

6868
- ${{ if eq(parameters.patchcheck, 'true') }}:
69-
- script: ./python Tools/scripts/patchcheck.py --travis true
69+
- script: |
70+
git fetch origin
71+
./python Tools/scripts/patchcheck.py --ci true
7072
displayName: 'Run patchcheck.py'
7173
condition: and(succeeded(), eq(variables['Build.Reason'], 'PullRequest'))
7274

.azure-pipelines/pr.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
variables:
5858
testRunTitle: '$(system.pullRequest.TargetBranch)-linux'
5959
testRunPlatform: linux
60-
openssl_version: 1.1.1l
60+
openssl_version: 1.1.1n
6161

6262
steps:
6363
- template: ./posix-steps.yml
@@ -83,7 +83,7 @@ jobs:
8383
variables:
8484
testRunTitle: '$(Build.SourceBranchName)-linux-coverage'
8585
testRunPlatform: linux-coverage
86-
openssl_version: 1.1.1l
86+
openssl_version: 1.1.1n
8787

8888
steps:
8989
- template: ./posix-steps.yml
@@ -98,7 +98,7 @@ jobs:
9898
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))
9999

100100
pool:
101-
vmImage: windows-2019
101+
vmImage: windows-2022
102102

103103
strategy:
104104
matrix:

.azure-pipelines/tcltk-build.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: tcl$(TkSourceTag)_$(Date:yyyyMMdd)$(Rev:.rr)
2+
3+
variables:
4+
IntDir: '$(Build.BinariesDirectory)\obj'
5+
ExternalsDir: '$(Build.BinariesDirectory)\externals'
6+
OutDir: '$(Build.ArtifactStagingDirectory)'
7+
Configuration: 'Release'
8+
9+
# MUST BE SET AT QUEUE TIME
10+
# SigningCertificate: 'Python Software Foundation'
11+
# SourcesRepo: 'https://github.com/python/cpython-source-deps'
12+
# TclSourceTag: 'tcl-core-8.6.12.0'
13+
# TkSourceTag: 'tk-8.6.12.0'
14+
# TixSourceTag: 'tix-8.4.3.6'
15+
16+
jobs:
17+
- job: Build_TclTk
18+
displayName: 'Tcl/Tk'
19+
pool:
20+
name: 'Windows Release'
21+
#vmImage: windows-latest
22+
23+
workspace:
24+
clean: all
25+
26+
steps:
27+
- template: ./find-tools.yml
28+
29+
- powershell: |
30+
git clone $(SourcesRepo) -b $(TclSourceTag) --depth 1 "$(ExternalsDir)\$(TclSourceTag)"
31+
displayName: 'Check out Tcl sources'
32+
33+
- powershell: |
34+
git clone $(SourcesRepo) -b $(TkSourceTag) --depth 1 "$(ExternalsDir)\$(TkSourceTag)"
35+
displayName: 'Check out Tk sources'
36+
37+
- powershell: |
38+
git clone $(SourcesRepo) -b $(TixSourceTag) --depth 1 "$(ExternalsDir)\$(TixSourceTag)"
39+
displayName: 'Check out Tix sources'
40+
41+
# This msbuild.rsp file will be used by the build to forcibly override these variables
42+
- powershell: |
43+
del -Force -EA 0 msbuild.rsp
44+
"/p:IntDir=$(IntDir)\" >> msbuild.rsp
45+
"/p:ExternalsDir=$(ExternalsDir)\" >> msbuild.rsp
46+
"/p:tclDir=$(ExternalsDir)\$(TclSourceTag)\" >> msbuild.rsp
47+
"/p:tkDir=$(ExternalsDir)\$(TkSourceTag)\" >> msbuild.rsp
48+
"/p:tixDir=$(ExternalsDir)\$(TixSourceTag)\" >> msbuild.rsp
49+
displayName: 'Generate msbuild.rsp'
50+
51+
- powershell: |
52+
& "$(msbuild)" PCbuild\tcl.vcxproj "@msbuild.rsp" /p:Platform=Win32 /p:tcltkDir="$(OutDir)\win32"
53+
& "$(msbuild)" PCbuild\tk.vcxproj "@msbuild.rsp" /p:Platform=Win32 /p:tcltkDir="$(OutDir)\win32"
54+
& "$(msbuild)" PCbuild\tix.vcxproj "@msbuild.rsp" /p:Platform=Win32 /p:tcltkDir="$(OutDir)\win32"
55+
displayName: 'Build for win32'
56+
57+
- powershell: |
58+
& "$(msbuild)" PCbuild\tcl.vcxproj "@msbuild.rsp" /p:Platform=x64 /p:tcltkDir="$(OutDir)\amd64"
59+
& "$(msbuild)" PCbuild\tk.vcxproj "@msbuild.rsp" /p:Platform=x64 /p:tcltkDir="$(OutDir)\amd64"
60+
& "$(msbuild)" PCbuild\tix.vcxproj "@msbuild.rsp" /p:Platform=x64 /p:tcltkDir="$(OutDir)\amd64"
61+
displayName: 'Build for amd64'
62+
63+
- powershell: |
64+
& "$(msbuild)" PCbuild\tcl.vcxproj "@msbuild.rsp" /p:Platform=ARM64 /p:tcltkDir="$(OutDir)\arm64"
65+
& "$(msbuild)" PCbuild\tk.vcxproj "@msbuild.rsp" /p:Platform=ARM64 /p:tcltkDir="$(OutDir)\arm64"
66+
& "$(msbuild)" PCbuild\tix.vcxproj "@msbuild.rsp" /p:Platform=ARM64 /p:tcltkDir="$(OutDir)\arm64"
67+
displayName: 'Build for arm64'
68+
69+
- publish: '$(OutDir)'
70+
artifact: 'tcltk'
71+
displayName: 'Publishing tcltk'

0 commit comments

Comments
 (0)