-
Notifications
You must be signed in to change notification settings - Fork 260
Expand file tree
/
Copy pathsetup.py
More file actions
40 lines (31 loc) · 983 Bytes
/
setup.py
File metadata and controls
40 lines (31 loc) · 983 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
import ast
from packaging.version import Version
from setuptools import setup
from setuptools_scm import get_version
version = get_version(
root="..",
relative_to=__file__,
# Preserve a/b pre-release suffixes, but intentionally strip rc suffixes.
tag_regex="^(?P<version>v\\d+\\.\\d+\\.\\d+(?:[ab]\\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 = "=="
setup(
version=version,
install_requires=[
f"cuda-bindings{matcher}{version}",
"cuda-pathfinder~=1.1",
],
extras_require={
"all": [f"cuda-bindings[all]{matcher}{version}"],
},
)