Skip to content

{Packaging} Migrate Azure CLI packages to PEP 621 pyproject.toml - #34144

Open
aryasadeghi1 wants to merge 6 commits into
Azure:devfrom
aryasadeghi1:packaging/pyproject-migration-7740
Open

aryasadeghi1 wants to merge 6 commits into
Azure:devfrom
aryasadeghi1:packaging/pyproject-migration-7740

Conversation

@aryasadeghi1

Copy link
Copy Markdown
Member

Moves the four Azure CLI distributions to declarative package metadata and updates the build tooling to support the migration.

  • Support modern Sphinx and include reference-documentation assets in distributions.
  • Allow current Requests 2.x releases through diff-tool 0.1.2.
  • Constrain azure-multiapi-storage<1.5 to preserve the API publishing still requires.
  • Add packaging checks and make style-test fixtures platform-independent.

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 feature


This checklist is used to make sure that common guidelines for a pull request are followed.

Preserve package payloads and dependencies while updating build discovery, version checks, and release consumers. Pin CI to azdev 0.2.14 and retain only justified setuptools compatibility constraints.

Related to Azure/azure-cli-extensions#7740.
Preserve upstream SDK versions and macOS broker support in the migrated package manifests.
Include upstream through 71f07c9 and preserve the recoveryservicesbackup 11.1.0 update in pyproject metadata.
Install azdev and azure-cli-diff-tool together from the same immutable candidate revision until the packages are released. Apply the pins to shared setup and current live-test jobs.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

The tools package’s declared Python compatibility is now inconsistent, and contributor documentation still references deleted setup files.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
What changed in this PR

Migrates four Azure CLI distributions to PEP 621 metadata and updates packaging, release, validation, and CI workflows.

Changes:

  • Replaces package setup.py metadata with pyproject.toml.
  • Adds package discovery, version validation, and distribution checks.
  • Updates build/install pipelines and pins temporary azdev tooling candidates.
File Description
tools/​setup.py Adds packaging validation dependencies.
tools/​automation/​verify/​default_modules.py References CLI pyproject metadata.
tools/​automation/​utilities/​path.py Discovers modern and legacy packages.
tools/​automation/​utilities/​packaging.py Reads and validates package versions.
tools/​automation/​tests/​verify_readme_history.py Validates built source distributions.
tools/​automation/​tests/​verify_package_versions.py Uses static metadata versions.
tools/​automation/​tests/​test_packaging_migration.py Adds packaging regression coverage.
src/​azure-cli/​requirements.py3.windows.txt Updates packaging dependency.
src/​azure-cli/​requirements.py3.Linux.txt Updates packaging dependency.
src/​azure-cli/​requirements.py3.Darwin.txt Updates packaging dependency.
src/​azure-cli/​pyproject.toml Defines the main CLI distribution.
src/​azure-cli-testsdk/​setup.py Removes legacy metadata.
src/​azure-cli-testsdk/​pyproject.toml Defines testsdk metadata.
src/​azure-cli-telemetry/​setup.py Removes legacy metadata.
src/​azure-cli-telemetry/​pyproject.toml Defines telemetry metadata.
src/​azure-cli-core/​setup.py Removes legacy metadata.
src/​azure-cli-core/​pyproject.toml Defines core metadata.
scripts/​release/​rpm/​test_rpm_in_docker.sh Updates RPM build tooling.
scripts/​release/​rpm/​test_azurelinux_in_docker.sh Updates Azure Linux build tooling.
scripts/​release/​pypi/​build.sh Builds PEP 517 packages.
scripts/​release/​homebrew/​docker/​run.sh Installs pyproject packages.
scripts/​release/​homebrew/​docker/​requirements.txt Narrows the local setuptools cap.
scripts/​release/​debian/​build.sh Installs pyproject packages.
scripts/​regression_test/​regression_test.yml Updates dependency rewriting.
scripts/​live_test/​CLITest.yml Installs candidate azdev tooling.
scripts/​install_full.sh Installs pyproject packages.
scripts/​ci/​version.sh Updates declarative versions.
scripts/​ci/​check_package_versions.py Validates distribution version alignment.
scripts/​ci/​build.sh Builds and validates PEP 517 packages.
requirements.txt Raises the setuptools security floor.
azure-pipelines.yml Adds packaging metadata tests.
azure-cli2017.pyproj Tracks pyproject files.
azure-cli.pyproj Tracks pyproject files.
.github/​CODEOWNERS Transfers metadata ownership rules.
.github/​actions/​env-setup/​action.yml Installs candidate development tools.
.azure-pipelines/​templates/​azdev_setup.yml Configures candidate azdev packages.
.azure-pipelines/​templates/​automation_test.yml Passes candidate package parameters.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread tools/setup.py
Comment on lines +24 to +25
'build>=1.2.2',
'twine>=6.1.0',
@yonzhan Yong Zhang (yonzhan) added this to the Backlog milestone Sep 29, 2026
@yonzhan

Copy link
Copy Markdown
Collaborator

Please fix CI issues

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants