Skip to content

Commit

Permalink
Python: Add missing metadata to pyproject.toml
Browse files Browse the repository at this point in the history
- Use a fixed version of Cython

- Readme file (fixes #78)

- Classifier for Python3.12

- Additional URLs

- Tests dependencies

- Recomended pytest configuration
  • Loading branch information
guysz-nvidia committed Nov 13, 2024
1 parent 32ded0e commit 17e6d3d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
16 changes: 15 additions & 1 deletion python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@ exclude = '''
'''

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

[project]
name = "nvtx"
version = "0.2.10"
description="PyNVTX - Python code annotation library"
readme = "README.md"
license = { text = "Apache 2.0" }
authors = [{name = "NVIDIA Corporation"}]
classifiers = [
Expand All @@ -39,10 +40,23 @@ classifiers = [
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]

[project.urls]
Homepage = "https://github.com/NVIDIA/NVTX"
Documentation = "https://nvtx.readthedocs.io/"
Repository = "https://github.com/NVIDIA/NVTX"
License = "https://nvidia.github.io/NVTX/LICENSE.txt"
Issues = "https://github.com/NVIDIA/NVTX/issues"

[project.optional-dependencies]
test = ["pytest", "Cython==3.0.11"]

[tool.setuptools.package-data]
"nvtx._lib" = ["*.pxd"]

[tool.pytest.ini_options]
addopts = [
"--import-mode=importlib", # Recomended by pytest: https://docs.pytest.org/en/7.1.x/explanation/goodpractices.html#choosing-a-test-layout-import-rules
]
1 change: 0 additions & 1 deletion python/test_requirements.txt

This file was deleted.

3 changes: 1 addition & 2 deletions python/tools/build-wheels.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ done
# Install packages and test
for PY_VERSION in 38 39 310 311; do
PYBIN=/opt/python/cp${PY_VERSION}*/bin
${PYBIN}/pip install nvtx --no-index -f /io/python/wheels/
${PYBIN}/pip install -r /io/python/test_requirements.txt
${PYBIN}/pip install nvtx[test] --no-index -f /io/python/wheels/
(cd "$HOME"; ${PYBIN}/pytest /io/python/nvtx)
done

0 comments on commit 17e6d3d

Please sign in to comment.