{CI} Support pyproject.toml builds and add migration guide - #10197
Merged
Ethan Yang (necusjz) merged 1 commit intoAug 10, 2026
Conversation
Build with python -m build and accept either pyproject.toml or setup.py, so extensions can migrate one at a time. Nothing is migrated here. test_source.py silently skipped extensions that had no setup.py; it now fails. It also no longer runs the build with cwd inside the extension, where the build/ dir shadows the build module and breaks every run after the first. sdist from build_package.py is now .tar.gz instead of .zip, since PEP 517 has no zip option. Built all 210 extensions locally to check this.
|
Hi aryasadeghi1, |
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
microsoft-github-policy-service
Bot
requested review from
Qi Pan (Pan-Qi),
Yu Chen (jsntcy),
ZelinWang (wangzelin007) and
Yong Zhang (yonzhan)
August 10, 2026 00:09
Member
|
/azp run |
Contributor
There was a problem hiding this comment.
Pull request overview
Updates CI and automation packaging flows to support PEP 517 builds (python -m build) so extensions can migrate from setup.py to pyproject.toml incrementally, and adds a migration guide for extension owners.
Changes:
- Switch CI/automation wheel building to
python -m build, allowing eitherpyproject.tomlor legacysetup.py. - Tighten CI validation by failing extensions that have neither build file, and improve build error output.
- Pin CI tooling (
azdev==0.2.13) and add documentation to guide extension migration.
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/ci/test_source.py | Builds wheels via python -m build (no cwd shadowing), validates build files exist, and improves error reporting. |
| scripts/ci/azdev_linter_style.py | Updates checks/error messaging to accept pyproject.toml during migration. |
| scripts/automation/build_package.py | Builds wheel+sdist via PEP 517 (python -m build) and supports either build definition file. |
| docs/README.md | Adds link to the new pyproject migration guide. |
| docs/pyproject-migration.md | Adds a migration guide and recommended pyproject.toml template/mapping notes. |
| azure-pipelines.yml | Pins azdev to 0.2.13 in ADO pipelines. |
| .gitignore | Ignores .migration_tmp/ artifacts. |
| .github/workflows/VersionCalPRComment.yml | Pins azdev to 0.2.13 in GitHub Actions workflow. |
| .github/azure-client-tools-bot/config.yml | Adds pyproject.toml to required-change checks and updates guidance text. |
| .github/actions/env-setup/action.yml | Pins azdev to 0.2.13 in shared action. |
| .azure-pipelines/templates/azdev_setup.yml | Pins azdev and installs build/wheel needed for PEP 517 builds. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
29
to
+30
| absdirpath = os.path.abspath(absdirs[0]) | ||
| check_call(['python', 'setup.py', 'bdist_wheel', '-d', dest_folder], cwd=absdirpath) | ||
| check_call(['python', 'setup.py', "sdist", "--format", "zip", '-d', dest_folder], cwd=absdirpath) | ||
| check_call(['python', '-m', 'build', '--wheel', '--sdist', '--no-isolation', '--outdir', dest_folder], cwd=absdirpath) |
Comment on lines
+10
to
+11
| - `pip` dropped legacy editable installs (`setup.py develop`), so `pip install -e` now needs a real | ||
| build backend. |
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 PR Validation — ️✔️ All clear
Build with python -m build and accept either pyproject.toml or setup.py, so extensions can migrate one at a time. Nothing is migrated here.
test_source.py silently skipped extensions that had no setup.py; it now fails. It also no longer runs the build with cwd inside the extension, where the build/ dir shadows the build module and breaks every run after the first.
sdist from build_package.py is now .tar.gz instead of .zip, since PEP 517 has no zip option.
Built all 210 extensions locally to check this.
This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
General Guidelines
azdev style <YOUR_EXT>locally? (pip install azdevrequired)python scripts/ci/test_index.py -qlocally? (pip install azdevrequired)For new extensions:
About Extension Publish
There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update
src/index.jsonautomatically.You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify
src/index.json.