Skip to content

Commit 6ec8cdc

Browse files
Cleanup setup.py and toml for versioning
Signed-off-by: Keval Morabia <[email protected]>
1 parent 103b1bb commit 6ec8cdc

File tree

2 files changed

+10
-17
lines changed

2 files changed

+10
-17
lines changed

pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
############################### BUILD CONFIGURATION ##############################################
33
####################################################################################################
44
[build-system]
5-
requires = ["cython", "setuptools>=67.8.0", "setuptools_scm[toml]>=7.1.0"]
5+
requires = ["cython", "setuptools>=80", "setuptools-scm>=8"]
66
build-backend = "setuptools.build_meta"
77

8+
[tool.setuptools_scm]
9+
810

911
####################################################################################################
1012
############################### LINTING, FORMATTING AND TESTING CONFIGURATION ####################

setup.py

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,8 @@
1818
import setuptools
1919
from setuptools_scm import get_version
2020

21-
# Package configuration ############################################################################
22-
name = "nvidia-modelopt"
23-
# TODO: Set version to static stable release version when creating the release branch
24-
# version = os.environ.get("SETUPTOOLS_SCM_PRETEND_VERSION", "X.Y.Z")
21+
# TODO: Set fallback_version to X.Y.Z release version when creating the release branch
2522
version = get_version(root=".", fallback_version="0.0.0")
26-
packages = setuptools.find_namespace_packages(include=["modelopt*"])
27-
package_dir = {"": "."}
28-
package_data = {"modelopt": ["**/*.h", "**/*.cpp", "**/*.cu"]}
29-
setup_kwargs = {}
3023

3124
# Required and optional dependencies ###############################################################
3225
required_deps = [
@@ -103,9 +96,8 @@
10396
# build/packaging tools
10497
"dev-build": [
10598
"cython",
106-
"setuptools>=67.8.0",
107-
"setuptools_scm>=7.1.0",
108-
"twine",
99+
"setuptools>=80",
100+
"setuptools-scm>=8",
109101
],
110102
}
111103

@@ -118,7 +110,7 @@
118110

119111
if __name__ == "__main__":
120112
setuptools.setup(
121-
name=name,
113+
name="nvidia-modelopt",
122114
version=version,
123115
description="Nvidia TensorRT Model Optimizer: a unified model optimization and deployment toolkit.",
124116
long_description="Checkout https://github.com/nvidia/TensorRT-Model-Optimizer for more information.",
@@ -136,8 +128,7 @@
136128
python_requires=">=3.10,<3.13",
137129
install_requires=required_deps,
138130
extras_require=optional_deps,
139-
packages=packages,
140-
package_dir=package_dir,
141-
package_data=package_data,
142-
**setup_kwargs,
131+
packages=setuptools.find_namespace_packages(include=["modelopt*"]),
132+
package_dir={"": "."},
133+
package_data={"modelopt": ["**/*.h", "**/*.cpp", "**/*.cu"]},
143134
)

0 commit comments

Comments
 (0)