Skip to content

Commit

Permalink
bpo-34977: Add Windows App Store package (pythonGH-11027)
Browse files Browse the repository at this point in the history
Also adds the PC/layout script for generating layouts on Windows.
  • Loading branch information
zooba authored Dec 11, 2018
1 parent 1c3de54 commit 0cd6391
Show file tree
Hide file tree
Showing 47 changed files with 2,928 additions and 405 deletions.
67 changes: 67 additions & 0 deletions .azure-pipelines/windows-appx-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
jobs:
- job: Prebuild
displayName: Pre-build checks

pool:
vmImage: ubuntu-16.04

steps:
- template: ./prebuild-checks.yml


- job: Windows_Appx_Tests
displayName: Windows Appx Tests
dependsOn: Prebuild
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))

pool:
vmImage: vs2017-win2016

strategy:
matrix:
win64:
arch: amd64
buildOpt: '-p x64'
testRunTitle: '$(Build.SourceBranchName)-win64-appx'
testRunPlatform: win64
maxParallel: 2

steps:
- checkout: self
clean: true
fetchDepth: 5

- powershell: |
# Relocate build outputs outside of source directory to make cleaning faster
Write-Host '##vso[task.setvariable variable=Py_IntDir]$(Build.BinariesDirectory)\obj'
# UNDONE: Do not build to a different directory because of broken tests
Write-Host '##vso[task.setvariable variable=Py_OutDir]$(Build.SourcesDirectory)\PCbuild'
Write-Host '##vso[task.setvariable variable=EXTERNAL_DIR]$(Build.BinariesDirectory)\externals'
displayName: Update build locations
- script: PCbuild\build.bat -e $(buildOpt)
displayName: 'Build CPython'
env:
IncludeUwp: true

- 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
displayName: 'Create APPX layout'

- script: .\python.exe -m test.pythoninfo
workingDirectory: $(Py_IntDir)\layout-$(arch)
displayName: 'Display build info'

- 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)"
workingDirectory: $(Py_IntDir)\layout-$(arch)
displayName: 'Tests'
env:
PREFIX: $(Py_IntDir)\layout-$(arch)

- task: PublishTestResults@2
displayName: 'Publish Test Results'
inputs:
testResultsFiles: '$(Build.BinariesDirectory)\test-results.xml'
mergeTestResults: true
testRunTitle: $(testRunTitle)
platform: $(testRunPlatform)
condition: succeededOrFailed()
2 changes: 2 additions & 0 deletions .azure-pipelines/windows-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ steps:

- script: PCbuild\build.bat -e $(buildOpt)
displayName: 'Build CPython'
env:
IncludeUwp: true

- script: python.bat -m test.pythoninfo
displayName: 'Display build info'
Expand Down
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

# Specific binary files
Lib/test/sndhdrdata/sndhdr.* binary
PC/classicAppCompat.* binary

# Text files that should not be subject to eol conversion
Lib/test/cjkencodings/* -text
Expand Down
4 changes: 4 additions & 0 deletions Doc/make.bat
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,16 @@ goto end
:build
if not exist "%BUILDDIR%" mkdir "%BUILDDIR%"

rem We ought to move NEWS to %BUILDDIR%\NEWS and point
rem Sphinx at the right location.
if exist ..\Misc\NEWS (
echo.Copying Misc\NEWS to build\NEWS
if not exist build mkdir build
copy ..\Misc\NEWS build\NEWS > nul
) else if exist ..\Misc\NEWS.D (
if defined BLURB (
echo.Merging Misc/NEWS with %BLURB%
if not exist build mkdir build
%BLURB% merge -f build\NEWS
) else (
echo.No Misc/NEWS file and Blurb is not available.
Expand Down
Loading

0 comments on commit 0cd6391

Please sign in to comment.