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
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/release_checklist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ body:
- label: File an internal nvbug to communicate test plan & release schedule with QA
- label: Ensure all pending PRs are reviewed, tested, and merged
- label: Check (or update if needed) the dependency requirements
- label: Bump the version
- label: Create a public rc tag
- label: "Point QA to fetch public artifacts (wheels) from the GHA run ID, example: `gh run download 12323257563 -p \"cuda-core*\" -R NVIDIA/cuda-python`"
- label: Wait for QA reports and fix any issues found
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/test-wheel-linux.yml
Copy link
Member

Choose a reason for hiding this comment

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

Thanks for the bug fix!

Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,9 @@ jobs:
run: |
set -euo pipefail
pushd cuda_pathfinder
pip install --only-binary=:all: -v . --group "test-cu${TEST_CUDA_MAJOR}"
# Install pathfinder from the pre-built wheel, since building from
# source won't work in this context (we don't have a git checkout).
pip install --only-binary=:all: -v ./*.whl --group "test-cu${TEST_CUDA_MAJOR}"
pip list
popd

Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ cuda_bindings/cuda/bindings/nvrtc.pxd
cuda_bindings/cuda/bindings/nvrtc.pyx
cuda_bindings/cuda/bindings/utils/_get_handle.pyx

# Version files from setuptools_scm
_version.py

# Distribution / packaging
.Python
build/
Expand Down
4 changes: 0 additions & 4 deletions cuda_bindings/cuda/bindings/_version.py

This file was deleted.

15 changes: 13 additions & 2 deletions cuda_bindings/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
# SPDX-FileCopyrightText: Copyright (c) 2023-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
[build-system]
requires = ["setuptools>=77.0.0", "cython>=3.2,<3.3", "pyclibrary>=0.1.7"]
requires = [
"setuptools>=80.0.0",
"setuptools_scm[simple]>=8",
"cython>=3.2,<3.3",
"pyclibrary>=0.1.7",
]
build-backend = "setuptools.build_meta"

[project]
Expand Down Expand Up @@ -51,7 +56,6 @@ Documentation = "https://nvidia.github.io/cuda-python/"
include = ["cuda*"]

[tool.setuptools.dynamic]
version = { attr = "cuda.bindings._version.__version__" }
readme = { file = ["DESCRIPTION.rst"], content-type = "text/x-rst" }

[tool.cibuildwheel]
Expand All @@ -72,3 +76,10 @@ required_plugins = "pytest-benchmark"
addopts = "--benchmark-disable --showlocals"
norecursedirs = ["tests/cython", "examples"]
xfail_strict = true

[tool.setuptools_scm]
root = ".."
version_file = "cuda/bindings/_version.py"
# We deliberately do not want to include the version suffixes (a/b/rc) in cuda-bindings versioning
tag_regex = "^(?P<version>v\\d+\\.\\d+\\.\\d+)"
git_describe_command = ["git", "describe", "--dirty", "--tags", "--long", "--match", "v*[0-9]*"]
5 changes: 0 additions & 5 deletions cuda_core/cuda/core/_version.py

This file was deleted.

14 changes: 12 additions & 2 deletions cuda_core/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
# SPDX-License-Identifier: Apache-2.0

[build-system]
requires = ["setuptools>=77.0.0", "Cython>=3.2,<3.3"]
requires = [
"setuptools>=80",
"setuptools-scm[simple]>=8",
"Cython>=3.2,<3.3"
]
build-backend = "build_hooks"
backend-path = ["."]

Expand Down Expand Up @@ -72,9 +76,15 @@ include = ["cuda.core*"]
"cuda.core._include" = ["*.h", "*.hpp", "*.cuh"]

[tool.setuptools.dynamic]
version = { attr = "cuda.core._version.__version__" }
readme = { file = ["DESCRIPTION.rst"], content-type = "text/x-rst" }

[tool.setuptools_scm]
root = ".."
version_file = "cuda/core/_version.py"
# We deliberately do not want to include the version suffixes (a/b/rc) in cuda-core versioning
tag_regex = "^cuda-core-(?P<version>v\\d+\\.\\d+\\.\\d+)"
git_describe_command = ["git", "describe", "--dirty", "--tags", "--long", "--match", "cuda-core-v*[0-9]*"]

[tool.cibuildwheel]
skip = "*-musllinux_*"
enable = "cpython-freethreading"
Expand Down
3 changes: 2 additions & 1 deletion cuda_pathfinder/cuda/pathfinder/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

"""cuda.pathfinder public APIs"""

from cuda.pathfinder._version import __version__ # noqa: F401

from cuda.pathfinder._dynamic_libs.load_dl_common import DynamicLibNotFoundError as DynamicLibNotFoundError
from cuda.pathfinder._dynamic_libs.load_dl_common import LoadedDL as LoadedDL
from cuda.pathfinder._dynamic_libs.load_nvidia_dynamic_lib import load_nvidia_dynamic_lib as load_nvidia_dynamic_lib
Expand All @@ -11,7 +13,6 @@
)
from cuda.pathfinder._headers.find_nvidia_headers import find_nvidia_header_directory as find_nvidia_header_directory
from cuda.pathfinder._headers.supported_nvidia_headers import SUPPORTED_HEADERS_CTK as _SUPPORTED_HEADERS_CTK
from cuda.pathfinder._version import __version__ as __version__

# Indirections to help Sphinx find the docstrings.
#: Mapping from short CUDA Toolkit (CTK) library names to their canonical
Expand Down
4 changes: 0 additions & 4 deletions cuda_pathfinder/cuda/pathfinder/_version.py

This file was deleted.

14 changes: 12 additions & 2 deletions cuda_pathfinder/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,23 @@ Documentation = "https://nvidia.github.io/cuda-python/"
packages = { find = { include = ["cuda*"] } }

[tool.setuptools.dynamic]
version = { attr = "cuda.pathfinder._version.__version__" }
readme = { file = ["DESCRIPTION.rst"], content-type = "text/x-rst" }

[build-system]
requires = ["setuptools>=64", "wheel"]
requires = [
"setuptools>=80.0.0",
"setuptools_scm[simple]>=8",
"wheel"
]
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]
root = ".."
version_file = "cuda/pathfinder/_version.py"
# We deliberately do not want to include the version suffixes (a/b/rc) in cuda-pathfinder versioning
tag_regex = "^cuda-pathfinder-(?P<version>v\\d+\\.\\d+\\.\\d+)"
git_describe_command = [ "git", "describe", "--dirty", "--tags", "--long", "--match", "cuda-pathfinder-v*[0-9]*" ]

[tool.pytest.ini_options]
addopts = "--showlocals"

Expand Down
6 changes: 5 additions & 1 deletion cuda_python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE

[build-system]
requires = ["setuptools>=77.0.0",]
requires = ["setuptools>=80.0.0", "setuptools-scm[simple]>=8"]
build-backend = "setuptools.build_meta"

[project]
Expand Down Expand Up @@ -40,3 +40,7 @@ homepage = "https://nvidia.github.io/cuda-python/"
documentation = "https://nvidia.github.io/cuda-python/"
repository = "https://github.com/NVIDIA/cuda-python/"
issues = "https://github.com/NVIDIA/cuda-python/issues/"

# The [tool.setuptools_scm] section is handled in setup.py since we need to
# dynamically set the dependency to cuda_bindings based on the dynamically
# determinded version
32 changes: 23 additions & 9 deletions cuda_python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,37 @@

import ast

from packaging.version import Version
from setuptools import setup
from setuptools_scm import get_version

version = get_version(
root="..",
relative_to=__file__,
# We deliberately do not want to include the version suffixes (a/b/rc) in cuda-python versioning
tag_regex="^(?P<version>v\\d+\\.\\d+\\.\\d+)",
git_describe_command=["git", "describe", "--dirty", "--tags", "--long", "--match", "v*[0-9]*"],
)


base_version = Version(version).base_version


if base_version == version:
# Tagged release
matcher = "~="
else:
# Pre-release version
matcher = "=="

# We want to keep the version in sync with cuda.bindings, but setuptools would not let
# us to refer to any files outside of the project root, so we have to employ our own
# run-time lookup using setup()...
with open("../cuda_bindings/cuda/bindings/_version.py") as f:
for line in f:
if line.startswith("__version__"):
version = ast.parse(line).body[0].value.value

setup(
version=version,
install_requires=[
f"cuda-bindings~={version}",
f"cuda-bindings{matcher}{version}",
"cuda-pathfinder~=1.1",
],
extras_require={
"all": [f"cuda-bindings[all]~={version}"],
"all": [f"cuda-bindings[all]{matcher}{version}"],
},
)
Loading