Skip to content

Commit

Permalink
Python: move static project metadata from setup.py to pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
guysz-nvidia committed Nov 13, 2024
1 parent 272fafb commit a850a60
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 26 deletions.
26 changes: 26 additions & 0 deletions python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,29 @@ exclude = '''

[build-system]
requires = ["setuptools", "wheel", "Cython"]

[project]
name = "nvtx"
version = "0.2.10"
description="PyNVTX - Python code annotation library"
license = { text = "Apache 2.0" }
authors = [{name = "NVIDIA Corporation"}]
classifiers = [
"Intended Audience :: Developers",
"Topic :: Database",
"Topic :: Scientific/Engineering",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]

[project.urls]
Homepage = "https://github.com/NVIDIA/NVTX"

[tool.setuptools.package-data]
"nvtx._lib" = ["*.pxd"]
27 changes: 1 addition & 26 deletions python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from distutils.sysconfig import get_python_lib

from Cython.Build import cythonize
from setuptools import find_packages, setup
from setuptools import setup
from setuptools.extension import Extension

cython_files = ["nvtx/**/*.pyx"]
Expand Down Expand Up @@ -71,25 +71,6 @@


setup(
name="nvtx",
version="0.2.10",
description="PyNVTX - Python code annotation library",
url="https://github.com/NVIDIA/nvtx",
author="NVIDIA Corporation",
license="Apache 2.0",
classifiers=[
"Intended Audience :: Developers",
"Topic :: Database",
"Topic :: Scientific/Engineering",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
],
# Include the separately-compiled shared library
ext_modules=cythonize(
extensions,
Expand All @@ -98,10 +79,4 @@
profile=False, language_level=3, embedsignature=True
),
),
packages=find_packages(include=["nvtx", "nvtx.*"]),
package_data=dict.fromkeys(
find_packages(include=["nvtx._lib*"]), ["*.pxd"],
),
license_files=["LICENSE.txt"],
zip_safe=False,
)

0 comments on commit a850a60

Please sign in to comment.