Skip to content

build: migrate model_analyzer to hatchling and pin the build backend - #1038

Merged
mc-nv merged 2 commits into
mainfrom
mchornyi/TRI-1775/update-metadata-version
Sep 15, 2026
Merged

mc-nv merged 2 commits into
mainfrom
mchornyi/TRI-1775/update-metadata-version

Conversation

@mc-nv

@mc-nv mc-nv commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

What does the PR do?

  • The PEP 639 SPDX license = "Apache-2.0" already declared here is rejected outright by setuptools <77, but the backend was an unbounded setuptools >= 61.0 — so the build only succeeded when the environment happened to provide a new enough setuptools.
  • Switches to a pinned hatchling backend and declares license-files explicitly.

Where should the reviewer start?

pyproject.toml.

Test plan:

Verified: Metadata-Version 2.4, License-Expression: Apache-2.0, License-File: LICENSE, the model-analyzer console script preserved, twine check passes.

Related PRs:

Related Issues:

  • Resolves: TRI-1775
CI (internal): [#67460724](http://tritonserver.local/ci/pipelines/67460724)

The PEP 639 SPDX `license = "Apache-2.0"` string already declared here is
rejected outright by setuptools < 77 ("project.license must be valid
exactly by one definition"), but the build backend was declared as an
unbounded `setuptools >= 61.0`. The build therefore only succeeded when
the environment happened to provide a new enough setuptools -- the same
class of environment-dependent wheel metadata bug tracked in TRI-1775,
in the opposite direction.

Switches to a pinned hatchling backend, aligning with tritonserver,
tritonfrontend, genai-perf and triton_cli, and declares license-files
explicitly rather than relying on implicit discovery.

Verified: Metadata-Version 2.4, License-Expression: Apache-2.0,
License-File: LICENSE, the model-analyzer console script is preserved,
and twine check passes.

Refs: TRI-1775
@greptile-apps

greptile-apps Bot commented Sep 11, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

The PR appears safe to merge; the explicit sdist configuration fully addresses the previously reported packaging-boundary concern.

Summary

  • Pins the build backend for reproducible PEP 639 metadata handling.
  • Preserves the model_analyzer wheel and console-script configuration.
  • Adds an explicit sdist policy that resolves the previous review finding about unintended tracked files.

Reviews (2) · Last reviewed commit: "fix: restore sdist package boundaries fo..."

Comment thread pyproject.toml
Only the wheel target declared a package-selection policy, so the sdist
fell back to hatchling's default file selection and shipped tracked
content the previous setuptools configuration kept out. An explicit
sdist target with only-include restores the intended boundaries;
only-include rather than include because the latter is additive and
still let docs/ through.

Verified: the sdist now carries model_analyzer, VERSION, LICENSE,
README.md and pyproject.toml, and the wheel is unchanged at the same 198
module files as the setuptools build.

Refs: TRI-1775
@mc-nv
mc-nv merged commit 5eab1ef into main Sep 15, 2026
4 of 5 checks passed
@mc-nv
mc-nv deleted the mchornyi/TRI-1775/update-metadata-version branch September 15, 2026 23:03
mc-nv added a commit that referenced this pull request Sep 16, 2026
…1038) (#1039)

* build: migrate model_analyzer to hatchling and pin the build backend

The PEP 639 SPDX `license = "Apache-2.0"` string already declared here is
rejected outright by setuptools < 77 ("project.license must be valid
exactly by one definition"), but the build backend was declared as an
unbounded `setuptools >= 61.0`. The build therefore only succeeded when
the environment happened to provide a new enough setuptools -- the same
class of environment-dependent wheel metadata bug tracked in TRI-1775,
in the opposite direction.

Switches to a pinned hatchling backend, aligning with tritonserver,
tritonfrontend, genai-perf and triton_cli, and declares license-files
explicitly rather than relying on implicit discovery.

Verified: Metadata-Version 2.4, License-Expression: Apache-2.0,
License-File: LICENSE, the model-analyzer console script is preserved,
and twine check passes.

Refs: TRI-1775

* fix: restore sdist package boundaries for model_analyzer

Only the wheel target declared a package-selection policy, so the sdist
fell back to hatchling's default file selection and shipped tracked
content the previous setuptools configuration kept out. An explicit
sdist target with only-include restores the intended boundaries;
only-include rather than include because the latter is additive and
still let docs/ through.

Verified: the sdist now carries model_analyzer, VERSION, LICENSE,
README.md and pyproject.toml, and the wheel is unchanged at the same 198
module files as the setuptools build.

Refs: TRI-1775
(cherry picked from commit 5eab1ef)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Build system or external dependencies (build: PRs)

Development

Successfully merging this pull request may close these issues.

2 participants