Skip to content

Commit 008b429

Browse files
authored
Backport #1411 (#1415)
* Backport #1411 * Search for cuda_bindings wheel locally * Secondary fixes * Ruff * Simplify import
1 parent b972c8e commit 008b429

12 files changed

Lines changed: 66 additions & 33 deletions

File tree

.github/ISSUE_TEMPLATE/release_checklist.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ body:
2020
- label: File an internal nvbug to communicate test plan & release schedule with QA
2121
- label: Ensure all pending PRs are reviewed, tested, and merged
2222
- label: Check (or update if needed) the dependency requirements
23-
- label: Bump the version
2423
- label: Create a public rc tag
2524
- 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`"
2625
- label: Wait for QA reports and fix any issues found

.github/workflows/test-wheel-linux.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,6 @@ jobs:
247247
LOCAL_CTK: ${{ matrix.LOCAL_CTK }}
248248
run: run-tests bindings
249249

250-
251-
252250
- name: Ensure cuda-python installable
253251
run: |
254252
if [[ "${{ matrix.LOCAL_CTK }}" == 1 ]]; then

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ cuda_bindings/cuda/bindings/nvrtc.pxd
4747
cuda_bindings/cuda/bindings/nvrtc.pyx
4848
cuda_bindings/cuda/bindings/utils/_get_handle.pyx
4949

50+
# Version files from setuptools_scm
51+
_version.py
52+
5053
# Distribution / packaging
5154
.Python
5255
build/

cuda_bindings/cuda/bindings/_version.py

Lines changed: 0 additions & 4 deletions
This file was deleted.

cuda_bindings/pyproject.toml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@
22
# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
33

44
[build-system]
5-
requires = ["setuptools>=77.0.0", "cython>=3.2,<3.3", "pyclibrary>=0.1.7"]
5+
requires = [
6+
"setuptools>=80.0.0",
7+
"setuptools-scm[simple]>=8",
8+
"cython>=3.2,<3.3",
9+
"pyclibrary>=0.1.7"
10+
]
611
build-backend = "setuptools.build_meta"
712

813
[project]
@@ -55,7 +60,6 @@ Documentation = "https://nvidia.github.io/cuda-python/"
5560
include = ["cuda*"]
5661

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

6165
[tool.ruff]
@@ -113,3 +117,10 @@ exclude = ["cuda/bindings/_version.py"]
113117
"UP022",
114118
"E402", # module level import not at top of file
115119
"F841"] # F841 complains about unused variables, but some assignments have side-effects that could be useful for tests (func calls for example)
120+
121+
[tool.setuptools_scm]
122+
root = ".."
123+
version_file = "cuda/bindings/_version.py"
124+
# We deliberately do not want to include the version suffixes (a/b/rc) in cuda-bindings versioning
125+
tag_regex = "^(?P<version>v\\d+\\.\\d+\\.\\d+)"
126+
git_describe_command = ["git", "describe", "--dirty", "--tags", "--long", "--match", "v*[0-9]*"]

cuda_core/cuda/core/_version.py

Lines changed: 0 additions & 5 deletions
This file was deleted.

cuda_core/pyproject.toml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33
# SPDX-License-Identifier: Apache-2.0
44

55
[build-system]
6-
requires = ["setuptools>=77.0.0", "Cython>=3.1"]
6+
requires = [
7+
"setuptools>=80.0.0",
8+
"setuptools_scm[simple]>=8",
9+
"Cython>=3.1"
10+
]
711
build-backend = "setuptools.build_meta"
812

913

@@ -65,7 +69,6 @@ include = ["cuda.core*"]
6569
"cuda.core.experimental.include" = ["*.h", "*.hpp", "*.cuh"]
6670

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

7174
[tool.ruff]
@@ -106,3 +109,10 @@ exclude = ["cuda/core/_version.py"]
106109
[tool.ruff.lint.per-file-ignores]
107110
"__init__.py" = ["F401"]
108111
"setup.py" = ["F401"]
112+
113+
[tool.setuptools_scm]
114+
root = ".."
115+
version_file = "cuda/core/_version.py"
116+
# We deliberately do not want to include the version suffixes (a/b/rc) in cuda-core versioning
117+
tag_regex = "^cuda-core-(?P<version>v\\d+\\.\\d+\\.\\d+)"
118+
git_describe_command = ["git", "describe", "--dirty", "--tags", "--long", "--match", "cuda-core-v*[0-9]*"]

cuda_pathfinder/cuda/pathfinder/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0
33

4+
from cuda.pathfinder._version import __version__ # noqa: F401
5+
46
from cuda.pathfinder._dynamic_libs.load_dl_common import DynamicLibNotFoundError as DynamicLibNotFoundError
57
from cuda.pathfinder._dynamic_libs.load_dl_common import LoadedDL as LoadedDL
68
from cuda.pathfinder._dynamic_libs.load_nvidia_dynamic_lib import load_nvidia_dynamic_lib as load_nvidia_dynamic_lib
79
from cuda.pathfinder._dynamic_libs.supported_nvidia_libs import (
810
SUPPORTED_LIBNAMES as SUPPORTED_NVIDIA_LIBNAMES, # noqa: F401
911
)
10-
from cuda.pathfinder._version import __version__ as __version__

cuda_pathfinder/cuda/pathfinder/_version.py

Lines changed: 0 additions & 4 deletions
This file was deleted.

cuda_pathfinder/pyproject.toml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,16 @@ version = { attr = "cuda.pathfinder._version.__version__" }
5858
readme = { file = ["DESCRIPTION.rst"], content-type = "text/x-rst" }
5959

6060
[build-system]
61-
requires = ["setuptools>=64", "wheel"]
61+
requires = ["setuptools>=80", "setuptools_scm[simple]>=8", "wheel"]
6262
build-backend = "setuptools.build_meta"
6363

64+
[tool.setuptools_scm]
65+
root = ".."
66+
version_file = "cuda/pathfinder/_version.py"
67+
# We deliberately do not want to include the version suffixes (a/b/rc) in cuda-pathfinder versioning
68+
tag_regex = "^cuda-pathfinder-(?P<version>v\\d+\\.\\d+\\.\\d+)"
69+
git_describe_command = [ "git", "describe", "--dirty", "--tags", "--long", "--match", "cuda-pathfinder-v*[0-9]*" ]
70+
6471
[tool.ruff]
6572
line-length = 120
6673
preview = true

0 commit comments

Comments
 (0)