{Packaging} Build release wheels with python -m build - #33995
Open
aryasadeghi1 wants to merge 1 commit into
Open
{Packaging} Build release wheels with python -m build#33995aryasadeghi1 wants to merge 1 commit into
python -m build#33995aryasadeghi1 wants to merge 1 commit into
Conversation
…urce distribution
microsoft-github-policy-service
Bot
requested review from
ZelinWang (wangzelin007) and
Yong Zhang (yonzhan)
August 27, 2026 02:29
Contributor
There was a problem hiding this comment.
Pull request overview
This PR completes the migration away from invoking setup.py directly for wheel/sdist creation, switching the remaining packaging call sites to the PEP 517 frontend (python -m build) in the release PyPI build script and the Windows Nano Server Docker image build.
Changes:
- Update
scripts/release/pypi/build.shto usepython -m buildfor wheel and sdist creation and install thebuildfrontend. - Update
Dockerfile.nanoserverto installbuildand replacesetup.py bdist_wheelwithpython -m build --wheel.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| scripts/release/pypi/build.sh | Switches packaging from setup.py CLI to python -m build, and updates tooling install notes/commands. |
| Dockerfile.nanoserver | Installs build and switches wheel creation in the Windows container to python -m build. |
Suppressed comments (1)
scripts/release/pypi/build.sh:36
--outdir $BUILD_STAGINGDIRECTORYshould be quoted to avoid word-splitting if the staging directory path contains spaces.
python -m build --wheel --no-isolation --outdir $BUILD_STAGINGDIRECTORY
python -m build --sdist --no-isolation --outdir $BUILD_STAGINGDIRECTORY
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+20
to
+24
| # Cap setuptools<81: setuptools 82 removes pkg_resources, which azure-cli still declares as a | ||
| # runtime dependency. The builds below go through the PEP 517 frontend, but --no-isolation means | ||
| # they use this setuptools too. | ||
| # `build` is that frontend. | ||
| pip install -U pip "setuptools<81" wheel build |
| RUN python -m pip install --upgrade pip | ||
| RUN pip install wheel | ||
| # `build` is the PEP 517 frontend used to build the wheels below. | ||
| RUN pip install wheel build |
Collaborator
|
Packaging |
Yong Zhang (yonzhan)
requested review from
mansoor sarfraz (msarfraz) and
Naga Nandyala (naga-nandyala)
August 27, 2026 03:31
Ethan Yang (necusjz)
approved these changes
Aug 27, 2026
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
Completes the move off
setup.pystarted in #33941, covering the last two call sites:scripts/release/pypi/build.sh(theBuildPythonWheeljob) andDockerfile.nanoserver.buildis added to both, since neither had it.--no-isolationkeeps the existingsetuptools<81pin in force.--wheeland--sdistare split because a barepython -m buildbuilds the wheel from the sdist, which would makeMANIFEST.inload-bearing.Also fixes the
setuptools<81comment: the pin is held by setuptools 82 droppingpkg_resources, not bysetup.py.Related command
Description
Testing Guide
History Notes
[Component Name 1] BREAKING CHANGE:
az command a: Make some customer-facing breaking change[Component Name 2]
az command b: Add some customer-facing featureThis checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.