Repository navigation
build: migrate model_analyzer to hatchling and pin the build backend - #1038
Merged
Merged
Conversation
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
This was referenced Sep 11, 2026
mc-nv
marked this pull request as ready for review
September 11, 2026 23:45
|
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
whoisj
approved these changes
Sep 15, 2026
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)
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.
What does the PR do?
license = "Apache-2.0"already declared here is rejected outright bysetuptools<77, but the backend was an unboundedsetuptools >= 61.0— so the build only succeeded when the environment happened to provide a new enough setuptools.license-filesexplicitly.Where should the reviewer start?
pyproject.toml.Test plan:
Verified: Metadata-Version 2.4,
License-Expression: Apache-2.0,License-File: LICENSE, themodel-analyzerconsole script preserved,twine checkpasses.Related PRs:
Related Issues:
- Resolves: TRI-1775
CI (internal): [#67460724](http://tritonserver.local/ci/pipelines/67460724)