Skip to content

Commit 0cd6391

Browse files
authored
bpo-34977: Add Windows App Store package (pythonGH-11027)
Also adds the PC/layout script for generating layouts on Windows.
1 parent 1c3de54 commit 0cd6391

Some content is hidden

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

47 files changed

+2928
-405
lines changed
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
jobs:
2+
- job: Prebuild
3+
displayName: Pre-build checks
4+
5+
pool:
6+
vmImage: ubuntu-16.04
7+
8+
steps:
9+
- template: ./prebuild-checks.yml
10+
11+
12+
- job: Windows_Appx_Tests
13+
displayName: Windows Appx Tests
14+
dependsOn: Prebuild
15+
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))
16+
17+
pool:
18+
vmImage: vs2017-win2016
19+
20+
strategy:
21+
matrix:
22+
win64:
23+
arch: amd64
24+
buildOpt: '-p x64'
25+
testRunTitle: '$(Build.SourceBranchName)-win64-appx'
26+
testRunPlatform: win64
27+
maxParallel: 2
28+
29+
steps:
30+
- checkout: self
31+
clean: true
32+
fetchDepth: 5
33+
34+
- powershell: |
35+
# Relocate build outputs outside of source directory to make cleaning faster
36+
Write-Host '##vso[task.setvariable variable=Py_IntDir]$(Build.BinariesDirectory)\obj'
37+
# UNDONE: Do not build to a different directory because of broken tests
38+
Write-Host '##vso[task.setvariable variable=Py_OutDir]$(Build.SourcesDirectory)\PCbuild'
39+
Write-Host '##vso[task.setvariable variable=EXTERNAL_DIR]$(Build.BinariesDirectory)\externals'
40+
displayName: Update build locations
41+
42+
- script: PCbuild\build.bat -e $(buildOpt)
43+
displayName: 'Build CPython'
44+
env:
45+
IncludeUwp: true
46+
47+
- script: python.bat PC\layout -vv -s "$(Build.SourcesDirectory)" -b "$(Py_OutDir)\$(arch)" -t "$(Py_IntDir)\layout-tmp-$(arch)" --copy "$(Py_IntDir)\layout-$(arch)" --precompile --preset-appx --include-tests
48+
displayName: 'Create APPX layout'
49+
50+
- script: .\python.exe -m test.pythoninfo
51+
workingDirectory: $(Py_IntDir)\layout-$(arch)
52+
displayName: 'Display build info'
53+
54+
- script: .\python.exe -m test -q -uall -u-cpu -rwW --slowest --timeout=1200 -j0 --junit-xml="$(Build.BinariesDirectory)\test-results.xml" --tempdir "$(Py_IntDir)\tmp-$(arch)"
55+
workingDirectory: $(Py_IntDir)\layout-$(arch)
56+
displayName: 'Tests'
57+
env:
58+
PREFIX: $(Py_IntDir)\layout-$(arch)
59+
60+
- task: PublishTestResults@2
61+
displayName: 'Publish Test Results'
62+
inputs:
63+
testResultsFiles: '$(Build.BinariesDirectory)\test-results.xml'
64+
mergeTestResults: true
65+
testRunTitle: $(testRunTitle)
66+
platform: $(testRunPlatform)
67+
condition: succeededOrFailed()

.azure-pipelines/windows-steps.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ steps:
1313

1414
- script: PCbuild\build.bat -e $(buildOpt)
1515
displayName: 'Build CPython'
16+
env:
17+
IncludeUwp: true
1618

1719
- script: python.bat -m test.pythoninfo
1820
displayName: 'Display build info'

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
# Specific binary files
2121
Lib/test/sndhdrdata/sndhdr.* binary
22+
PC/classicAppCompat.* binary
2223

2324
# Text files that should not be subject to eol conversion
2425
Lib/test/cjkencodings/* -text

Doc/make.bat

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,16 @@ goto end
115115
:build
116116
if not exist "%BUILDDIR%" mkdir "%BUILDDIR%"
117117

118+
rem We ought to move NEWS to %BUILDDIR%\NEWS and point
119+
rem Sphinx at the right location.
118120
if exist ..\Misc\NEWS (
119121
echo.Copying Misc\NEWS to build\NEWS
122+
if not exist build mkdir build
120123
copy ..\Misc\NEWS build\NEWS > nul
121124
) else if exist ..\Misc\NEWS.D (
122125
if defined BLURB (
123126
echo.Merging Misc/NEWS with %BLURB%
127+
if not exist build mkdir build
124128
%BLURB% merge -f build\NEWS
125129
) else (
126130
echo.No Misc/NEWS file and Blurb is not available.

0 commit comments

Comments
 (0)