Skip to content

Commit 188370e

Browse files
committed
set up dynamic version/dependencies
1 parent 9818914 commit 188370e

File tree

2 files changed

+21
-4
lines changed

2 files changed

+21
-4
lines changed

cuda_python/pyproject.toml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ build-backend = "setuptools.build_meta"
88

99
[project]
1010
name = "cuda-python"
11-
version = "12.6.3"
1211
description = "CUDA Python: Performance meets Productivity"
1312
readme = {file = "README.md", content-type = "text/markdown"}
1413
authors = [{name = "NVIDIA Corporation", email = "[email protected]"},]
@@ -33,9 +32,7 @@ classifiers = [
3332
"Environment :: GPU :: NVIDIA CUDA",
3433
"Environment :: GPU :: NVIDIA CUDA :: 12",
3534
]
36-
dependencies = [
37-
"cuda-bindings~=12.6.3",
38-
]
35+
dynamic = ["version", "dependencies"]
3936

4037
[project.urls]
4138
homepage = "https://nvidia.github.io/cuda-python/"

cuda_python/setup.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Copyright (c) 2025, NVIDIA CORPORATION & AFFILIATES. ALL RIGHTS RESERVED.
2+
#
3+
# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
4+
5+
from setuptools import setup
6+
7+
# We want to keep the version in sync with cuda.bindings, but setuptools would not let
8+
# us to refer to any files outside of the project root, so we have to employ our own
9+
# run-time lookup using setup()...
10+
with open("../cuda_bindings/cuda/bindings/_version.py") as f:
11+
exec(f.read())
12+
version = __version__ # noqa: F821
13+
del __version__ # noqa: F821
14+
15+
setup(
16+
version=version,
17+
install_requires=[
18+
f"cuda-bindings~={version}",
19+
],
20+
)

0 commit comments

Comments
 (0)