Repository navigation
#4894 - Polygraphy: add the missing pyproject.toml - #4896
Draft
ConnorBaker wants to merge 1 commit into
Draft
ConnorBaker wants to merge 1 commit into
ConnorBaker wants to merge 1 commit into
Conversation
The TensorRT 11.3 OSS release removed setup.py and setup.cfg from tools/Polygraphy and switched the Makefile and install.ps1 to `python -m build --wheel`, following the build system's migration to pyproject.toml (CHANGELOG, v0.49.34). The pyproject.toml itself was not included, so `make install`, install.ps1 and the README's "Building From Source" steps fail: with neither file, the directory isn't a Python project. Add a pyproject.toml that reproduces the metadata of the published polygraphy 0.53.6 wheel: the version from polygraphy.__version__, the description, README.md as the long description, the license, author, classifiers and homepage, `Requires-Python: >=3.8`, and the `polygraphy` console script. Only the polygraphy package is included, as tests/test_packaging.py expects. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Connor Baker <ConnorBaker01@gmail.com>
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.
Fixes #4894.
TensorRT 11.3 removed
tools/Polygraphy/setup.pyandsetup.cfgand switched the Makefile andinstall.ps1topython -m build --wheel, as the CHANGELOG's v0.49.34 entry describes ("Migrated the build system topyproject.toml"). Thepyproject.tomlitself wasn't included, so building Polygraphy from source fails:This adds a
pyproject.tomlthat reproduces the metadata of the polygraphy 0.53.6 wheel on PyPI: the version frompolygraphy.__version__, the description,README.mdas the long description, the license, author, classifiers and homepage,Requires-Python: >=3.8, and thepolygraphyconsole script. Only thepolygraphypackage is included, astests/test_packaging.pyexpects.project.licensekeeps the table form,{ text = "Apache 2.0" }, because that is what gives the published wheel itsLicense: Apache 2.0. setuptools 83.0.0 warns that the table form is deprecated and has to be replaced by 2027-02-18. An SPDX expression would change the published metadata, so I've left that choice to you.Testing (x86_64-linux, Python 3.14.8, setuptools 83.0.0, on
v11.4, which is the same commit asmain):entry_points.txt,top_level.txtandMETADATAbody. The differences:METADATAaddsLicense-File: LICENSE.txtandDynamic: license-file, and the dist-info haslicenses/LICENSE.txt;WHEELhasGenerator: setuptools (83.0.0), where PyPI's has(84.0.0);zip-safefile.tests/backend/base/test_loader.py,tests/common/test_interface.py,tests/common/test_struct.py,tests/comparator/test_compare.py,tests/comparator/test_postprocess.py,tests/func/test_func.py,tests/logger/test_logger.py,tests/mod/test_exporter.py,tests/mod/test_util.pyandtests/test_deprecated_aliases.py.make installandinstall.ps1themselves,tests/test_packaging.py(it needs pytest-virtualenv and network access), and the other test modules, including all of those that import TensorRT.AI disclosure: this change and description were prepared with Claude Code (Claude Opus 5.5); the commit carries a
Co-Authored-By: Claudetrailer.🤖 Generated with Claude Code