Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions genai-perf/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
name = "genai-perf"
readme = "README.md"
description = "GenAI Perf Analyzer CLI - CLI tool to simplify profiling LLMs and Generative AI models with Perf Analyzer"
license = {text = "BSD"}
license = "BSD-3-Clause"
license-files = ["LICENSE"]
dynamic = ["version"]
classifiers = [
"Development Status :: 3 - Alpha",
Expand Down Expand Up @@ -78,7 +79,7 @@ genai-perf = "genai_perf.main:main"

# Build
[build-system]
requires = ["hatchling"]
requires = ["hatchling==1.27.0"]
build-backend = "hatchling.build"

[tool.hatch.version]
Expand Down
25 changes: 16 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,30 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

[build-system]
requires = ["setuptools>=42", "wheel"]
build-backend = "setuptools.build_meta"
requires = ["hatchling==1.27.0"]
build-backend = "hatchling.build"

[project]
name = "perf-analyzer"
dynamic = ["version"]
description = "Triton Performance Analyzer"
readme = "README.md"
license = "BSD-3-Clause"
license-files = ["LICENSE"]
# Also pins the wheel to a py3 tag: without it hatchling emits
# py2.py3-none-any, wrongly advertising Python 2 support.
requires-python = ">=3.10"

[tool.setuptools.dynamic]
version = {attr = "perf_analyzer.__version__"}
[tool.hatch.version]
path = "src/perf_analyzer/__init__.py"

[tool.setuptools.packages.find]
where = ["src"]

[tool.setuptools.package-data]
"perf_analyzer" = ["bin/perf_analyzer"]
[tool.hatch.build.targets.wheel]
packages = ["src/perf_analyzer"]
# bin/perf_analyzer is produced by the CMake build and matched by the
# "bin/" rule in .gitignore. Hatchling's file selection is VCS-ignore
# aware, so without listing it as an artifact the compiled binary would
# be silently dropped from the wheel. See TRI-1775.
artifacts = ["src/perf_analyzer/bin/perf_analyzer"]
Comment on lines +45 to +51

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Wheel Contract Lacks Coverage

This build-backend migration changes package discovery and relies on Hatchling-specific artifact handling for the executable, but no test builds and inspects the resulting perf-analyzer wheel. The installed wrapper requires perf_analyzer/bin/perf_analyzer at runtime, so add a wheel-content smoke test that verifies the version, entry point, and executable. Without one, future packaging changes could silently ship an unusable CLI.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!


[project.scripts]
perf_analyzer = "perf_analyzer.cli:main"
Expand Down
Loading