Skip to content

Building Python/WinRT projection in Azure Pipelines#356

Merged
devhawk merged 2 commits into
masterfrom
devhawk/buildpyproj
Apr 25, 2019
Merged

Building Python/WinRT projection in Azure Pipelines#356
devhawk merged 2 commits into
masterfrom
devhawk/buildpyproj

Conversation

@devhawk

@devhawk devhawk commented Apr 25, 2019

Copy link
Copy Markdown
Contributor

Note, this PR is squash merged branch so CodeFlow users can review this PR.

This PR includes azure pipelies yaml files to enable building the full Python projection of WinRT in Azure Pipelines. An example Azure build of this branch is here: Example Build: https://dev.azure.com/msft-xlang/public/_build/results?buildId=1877. Additionally, the full signed proejction is available from test.pypi at https://test.pypi.org/project/winrt/.

Notes:

  • src\package\pywinrt\projection contains two pipeline yml files - pipeline-internal and pipeline-public. The only difference between the two pipelines is the addition of a signing step for pipeline-internal. Both yml files use templates from src\package\pywinrt\projection\AzurePipelinesTemplates to eliminate duplication.
  • src\package\pywinrt\projection\AzurePipelinesTemplates\steps-build-projection.yml reads the projection type from a queue time build variable. If the value of ProjectionType is "full", it generates the full WinRT projection (except for Windows.UI.Xaml and Windows.UI.Composition which are not supported by Py/WinRT yet). Otherwise it generates the small partial projection. The public projection build pipeline defaults to partial projection. Internal projection build pipeline defaults to full projeciton.

Other Changes:

  • For packaging purposes, the binary extension now lives inside the top level package rather than as a sibling of the python code package
  • removed code from generated setup.py file for compiling the extension module.
  • wrap functions in generated cpp files in a namespace to enable unity builds (i.e. combining multiple cpp files into a single compilation unit). Not currently using unity builds, but we experimented with using them. We kept the code gen change in order to enable maximum flexibility in build pipeline creation down the road
  • Add precompiled header support to generated projection
  • The full projection uses a custom setup.py file rather than the one generated by pywinrt

@devhawk devhawk requested a review from Scottj1s as a code owner April 25, 2019 16:26
@devhawk

devhawk commented Apr 25, 2019

Copy link
Copy Markdown
Contributor Author

here's the link for the publci build of this branch: https://dev.azure.com/msft-xlang/public/_build/results?buildId=1888

Comment thread src/package/pywinrt/projection/CMakeLists.txt
Comment thread src/package/pywinrt/projection/generate.ps1

@Scottj1s Scottj1s left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@devhawk devhawk merged commit 83c96ed into master Apr 25, 2019
@devhawk devhawk deleted the devhawk/buildpyproj branch May 8, 2019 23:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants