Port data-plane packages in sdk/core/ to pyproject.toml#45556
Port data-plane packages in sdk/core/ to pyproject.toml#45556
Conversation
Co-authored-by: l0lawrence <100643745+l0lawrence@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Migrates sdk/core/ data-plane packages from setup.py to PEP 517/518 pyproject.toml packaging, consolidating metadata (deps/extras/version/readme/package discovery) into a single declarative config per package.
Changes:
- Removed legacy
setup.pypackaging scripts for core packages. - Added full PEP 621
[project]metadata plus dynamic version/readme configuration inpyproject.toml. - Defined optional dependency extras (e.g.,
aio,tracing, transport extras) inpyproject.toml.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/core/corehttp/setup.py | Removed legacy setuptools script in favor of pyproject.toml. |
| sdk/core/corehttp/pyproject.toml | Added PEP 621 metadata, extras, dynamic version/readme, and package discovery config. |
| sdk/core/azure-core/setup.py | Removed legacy setuptools script in favor of pyproject.toml. |
| sdk/core/azure-core/pyproject.toml | Added PEP 621 metadata, extras, dynamic version/readme, and package discovery config. |
| sdk/core/azure-core-tracing-opentelemetry/setup.py | Removed legacy setuptools script in favor of pyproject.toml. |
| sdk/core/azure-core-tracing-opentelemetry/pyproject.toml | Added PEP 621 metadata + dynamic version/readme + package discovery config for tracing plugin. |
| sdk/core/azure-core-experimental/setup.py | Removed legacy setuptools script in favor of pyproject.toml. |
| sdk/core/azure-core-experimental/pyproject.toml | Added PEP 621 metadata + dynamic version/readme + package discovery config for experimental package. |
| sdk/core/azure-common/setup.py | Removed legacy setuptools script in favor of pyproject.toml. |
| sdk/core/azure-common/pyproject.toml | Added PEP 621 metadata + dynamic version/readme + package discovery config. |
| readme = {file = ["README.md", "CHANGELOG.md"], content-type = "text/markdown"} | ||
|
|
||
| [tool.setuptools.packages.find] | ||
| exclude = ["tests*", "samples*", "azure"] |
There was a problem hiding this comment.
[tool.setuptools.packages.find] will currently include packages like azure.core, azure.core.tracing, and azure.core.tracing.ext from this repo copy (those directories contain __init__.py here). Shipping those in the wheel would overwrite the real azure-core implementation (and its existing azure.core.tracing.ext) during installation, breaking tracing/runtime behavior. Restrict package discovery to only the plugin package (e.g., include = ["azure.core.tracing.ext.opentelemetry_span*"] or an explicit package list) so the wheel only adds opentelemetry_span and does not repackage/override parent packages.
| exclude = ["tests*", "samples*", "azure"] | |
| include = ["azure.core.tracing.ext.opentelemetry_span*"] | |
| exclude = ["tests*", "samples*"] |
|
@copilot apistub is failing for some pkgs help fix that |
…ict package discovery for extension packages Co-authored-by: l0lawrence <100643745+l0lawrence@users.noreply.github.com>
Fixed in b8fb1fe. Two issues were causing apistub failures:
Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
…://github.com/Azure/azure-sdk-for-python into copilot/port-data-plane-packages-to-pyproject
azure-coreto use pyproject.tomlazure-core-experimentalto use pyproject.tomlazure-core-tracing-opentelemetryto use pyproject.tomlcorehttpto use pyproject.tomlazure-commonto use pyproject.tomlazure-common: adddependencies = []to[project]section soci_tools.parsing.ParsedSetup(used by apistub and other CI tools) doesn't fail withTypeError: 'NoneType' object is not iterableazure-core-experimental: switch toinclude = ["azure.core.experimental*"]in[tool.setuptools.packages.find]to avoid shipping namespace__init__.pyfiles that overlap withazure-coreazure-core-tracing-opentelemetry: switch toinclude = ["azure.core.tracing.ext.opentelemetry_span*"]to avoid shipping namespace__init__.pyfiles that overlap withazure-core💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.