Skip to content

Commit

Permalink
Merge branch 'master' into fix-issue24255
Browse files Browse the repository at this point in the history
* 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)
  ...
  • Loading branch information
CuriousLearner committed Jun 21, 2019
2 parents 5c9062d + d006800 commit 7bf6445
Show file tree
Hide file tree
Showing 1,076 changed files with 64,958 additions and 18,640 deletions.
4 changes: 2 additions & 2 deletions .azure-pipelines/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
variables:
testRunTitle: '$(build.sourceBranchName)-linux'
testRunPlatform: linux
openssl_version: 1.1.0j
openssl_version: 1.1.1c

steps:
- template: ./posix-steps.yml
Expand Down Expand Up @@ -116,7 +116,7 @@ jobs:
variables:
testRunTitle: '$(Build.SourceBranchName)-linux-coverage'
testRunPlatform: linux-coverage
openssl_version: 1.1.0j
openssl_version: 1.1.1c

steps:
- template: ./posix-steps.yml
Expand Down
2 changes: 1 addition & 1 deletion .azure-pipelines/docs-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ steps:
inputs:
versionSpec: '>=3.6'

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

- ${{ if ne(parameters.latex, 'true') }}:
Expand Down
4 changes: 2 additions & 2 deletions .azure-pipelines/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
variables:
testRunTitle: '$(system.pullRequest.TargetBranch)-linux'
testRunPlatform: linux
openssl_version: 1.1.0j
openssl_version: 1.1.1c

steps:
- template: ./posix-steps.yml
Expand Down Expand Up @@ -116,7 +116,7 @@ jobs:
variables:
testRunTitle: '$(Build.SourceBranchName)-linux-coverage'
testRunPlatform: linux-coverage
openssl_version: 1.1.0j
openssl_version: 1.1.1c

steps:
- template: ./posix-steps.yml
Expand Down
96 changes: 96 additions & 0 deletions .azure-pipelines/windows-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
name: Release_$(Build.SourceBranchName)_$(SourceTag)_$(Date:yyyyMMdd)$(Rev:.rr)

# QUEUE TIME VARIABLES
# variables:
# GitRemote: python
# SourceTag:
# DoPGO: true
# SigningCertificate: 'Python Software Foundation'
# SigningDescription: 'Built: $(Build.BuildNumber)'
# DoLayout: true
# DoMSIX: true
# DoNuget: true
# DoEmbed: true
# DoMSI: true
# DoPublish: false

trigger: none
pr: none

stages:
- stage: Build
displayName: Build binaries
jobs:
- template: windows-release/stage-build.yml

- stage: Sign
displayName: Sign binaries
dependsOn: Build
jobs:
- template: windows-release/stage-sign.yml

- stage: Layout
displayName: Generate layouts
dependsOn: Sign
jobs:
- template: windows-release/stage-layout-full.yml
- template: windows-release/stage-layout-embed.yml
- template: windows-release/stage-layout-nuget.yml

- stage: Pack
dependsOn: Layout
jobs:
- template: windows-release/stage-pack-nuget.yml

- stage: Test
dependsOn: Pack
jobs:
- template: windows-release/stage-test-embed.yml
- template: windows-release/stage-test-nuget.yml

- stage: Layout_MSIX
displayName: Generate MSIX layouts
dependsOn: Sign
condition: and(succeeded(), eq(variables['DoMSIX'], 'true'))
jobs:
- template: windows-release/stage-layout-msix.yml

- stage: Pack_MSIX
displayName: Package MSIX
dependsOn: Layout_MSIX
jobs:
- template: windows-release/stage-pack-msix.yml

- stage: Build_MSI
displayName: Build MSI installer
dependsOn: Sign
condition: and(succeeded(), eq(variables['DoMSI'], 'true'))
jobs:
- template: windows-release/stage-msi.yml

- stage: Test_MSI
displayName: Test MSI installer
dependsOn: Build_MSI
jobs:
- template: windows-release/stage-test-msi.yml

- stage: PublishPyDotOrg
displayName: Publish to python.org
dependsOn: ['Test_MSI', 'Test']
condition: and(succeeded(), eq(variables['DoPublish'], 'true'))
jobs:
- template: windows-release/stage-publish-pythonorg.yml

- stage: PublishNuget
displayName: Publish to nuget.org
dependsOn: Test
condition: and(succeeded(), eq(variables['DoPublish'], 'true'))
jobs:
- template: windows-release/stage-publish-nugetorg.yml

- stage: PublishStore
displayName: Publish to Store
dependsOn: Pack_MSIX
condition: and(succeeded(), eq(variables['DoPublish'], 'true'))
jobs:
- template: windows-release/stage-publish-store.yml
83 changes: 83 additions & 0 deletions .azure-pipelines/windows-release/build-steps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
parameters:
ShouldPGO: false

steps:
- template: ./checkout.yml

- powershell: |
$d = (.\PCbuild\build.bat -V) | %{ if($_ -match '\s+(\w+):\s*(.+)\s*$') { @{$Matches[1] = $Matches[2];} }};
Write-Host "##vso[task.setvariable variable=VersionText]$($d.PythonVersion)"
Write-Host "##vso[task.setvariable variable=VersionNumber]$($d.PythonVersionNumber)"
Write-Host "##vso[task.setvariable variable=VersionHex]$($d.PythonVersionHex)"
Write-Host "##vso[task.setvariable variable=VersionUnique]$($d.PythonVersionUnique)"
Write-Host "##vso[build.addbuildtag]$($d.PythonVersion)"
Write-Host "##vso[build.addbuildtag]$($d.PythonVersion)-$(Name)"
displayName: 'Extract version numbers'

- ${{ if eq(parameters.ShouldPGO, 'false') }}:
- powershell: |
$env:SigningCertificate = $null
.\PCbuild\build.bat -v -p $(Platform) -c $(Configuration)
displayName: 'Run build'
env:
IncludeUwp: true
Py_OutDir: '$(Build.BinariesDirectory)\bin'
- ${{ if eq(parameters.ShouldPGO, 'true') }}:
- powershell: |
$env:SigningCertificate = $null
.\PCbuild\build.bat -v -p $(Platform) --pgo
displayName: 'Run build with PGO'
env:
IncludeUwp: true
Py_OutDir: '$(Build.BinariesDirectory)\bin'
- powershell: |
$kitroot = (gp 'HKLM:\SOFTWARE\Microsoft\Windows Kits\Installed Roots\').KitsRoot10
$tool = (gci -r "$kitroot\Bin\*\x64\signtool.exe" | sort FullName -Desc | select -First 1)
if (-not $tool) {
throw "SDK is not available"
}
Write-Host "##vso[task.prependpath]$($tool.Directory)"
displayName: 'Add WinSDK tools to path'

- powershell: |
$env:SigningCertificate = $null
.\python.bat PC\layout -vv -t "$(Build.BinariesDirectory)\catalog" --catalog "${env:CAT}.cdf" --preset-default
makecat "${env:CAT}.cdf"
del "${env:CAT}.cdf"
if (-not (Test-Path "${env:CAT}.cat")) {
throw "Failed to build catalog file"
}
displayName: 'Generate catalog'
env:
CAT: $(Build.BinariesDirectory)\bin\$(Arch)\python

- task: PublishPipelineArtifact@0
displayName: 'Publish binaries'
condition: and(succeeded(), not(and(eq(variables['Configuration'], 'Release'), variables['SigningCertificate'])))
inputs:
targetPath: '$(Build.BinariesDirectory)\bin\$(Arch)'
artifactName: bin_$(Name)

- task: PublishPipelineArtifact@0
displayName: 'Publish binaries for signing'
condition: and(succeeded(), and(eq(variables['Configuration'], 'Release'), variables['SigningCertificate']))
inputs:
targetPath: '$(Build.BinariesDirectory)\bin\$(Arch)'
artifactName: unsigned_bin_$(Name)

- task: CopyFiles@2
displayName: 'Layout Artifact: symbols'
inputs:
sourceFolder: $(Build.BinariesDirectory)\bin\$(Arch)
targetFolder: $(Build.ArtifactStagingDirectory)\symbols\$(Name)
flatten: true
contents: |
**\*.pdb
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: symbols'
inputs:
PathToPublish: '$(Build.ArtifactStagingDirectory)\symbols'
ArtifactName: symbols
21 changes: 21 additions & 0 deletions .azure-pipelines/windows-release/checkout.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
parameters:
depth: 3

steps:
- checkout: none

- script: git clone --progress -v --depth ${{ parameters.depth }} --branch $(SourceTag) --single-branch https://github.com/$(GitRemote)/cpython.git .
displayName: 'git clone ($(GitRemote)/$(SourceTag))'
condition: and(succeeded(), and(variables['GitRemote'], variables['SourceTag']))

- script: git clone --progress -v --depth ${{ parameters.depth }} --branch $(SourceTag) --single-branch $(Build.Repository.Uri) .
displayName: 'git clone (<default>/$(SourceTag))'
condition: and(succeeded(), and(not(variables['GitRemote']), variables['SourceTag']))

- script: git clone --progress -v --depth ${{ parameters.depth }} --branch $(Build.SourceBranchName) --single-branch https://github.com/$(GitRemote)/cpython.git .
displayName: 'git clone ($(GitRemote)/<default>)'
condition: and(succeeded(), and(variables['GitRemote'], not(variables['SourceTag'])))

- script: git clone --progress -v --depth ${{ parameters.depth }} --branch $(Build.SourceBranchName) --single-branch $(Build.Repository.Uri) .
displayName: 'git clone'
condition: and(succeeded(), and(not(variables['GitRemote']), not(variables['SourceTag'])))
17 changes: 17 additions & 0 deletions .azure-pipelines/windows-release/find-sdk.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Locate the Windows SDK and add its binaries directory to PATH
#
# `toolname` can be overridden to use a different marker file.

parameters:
toolname: signtool.exe

steps:
- powershell: |
$kitroot = (gp 'HKLM:\SOFTWARE\Microsoft\Windows Kits\Installed Roots\').KitsRoot10
$tool = (gci -r "$kitroot\Bin\*\${{ parameters.toolname }}" | sort FullName -Desc | select -First 1)
if (-not $tool) {
throw "SDK is not available"
}
Write-Host "##vso[task.prependpath]$($tool.Directory)"
Write-Host "Adding $($tool.Directory) to PATH"
displayName: 'Add WinSDK tools to path'
15 changes: 15 additions & 0 deletions .azure-pipelines/windows-release/layout-command.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
steps:
- powershell: >
Write-Host (
'##vso[task.setvariable variable=LayoutCmd]&
"{0}\bin\python.exe"
"{1}\PC\layout"
-vv
--source "{1}"
--build "{0}\bin"
--temp "{0}\layout-temp"
--include-cat "{0}\bin\python.cat"
--doc-build "{0}\doc"'
-f ("$(Build.BinariesDirectory)", "$(Build.SourcesDirectory)")
)
displayName: 'Set LayoutCmd'
13 changes: 13 additions & 0 deletions .azure-pipelines/windows-release/mingw-lib.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
parameters:
DllToolOpt: -m i386:x86-64
#DllToolOpt: -m i386 --as-flags=--32

steps:
- powershell: |
git clone https://github.com/python/cpython-bin-deps --branch binutils --single-branch --depth 1 --progress -v "binutils"
gci "bin\$(Arch)\python*.dll" | %{
& "binutils\gendef.exe" $_ | Out-File -Encoding ascii tmp.def
& "binutils\dlltool.exe" --dllname $($_.BaseName).dll --def tmp.def --output-lib "$($_.Directory)\lib$($_.BaseName).a" ${{ parameters.DllToolOpt }}
}
displayName: 'Generate MinGW import library'
workingDirectory: $(Build.BinariesDirectory)
Loading

0 comments on commit 7bf6445

Please sign in to comment.