forked from NVIDIA/cuda-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
130 lines (110 loc) · 3.39 KB
/
Copy pathpyproject.toml
File metadata and controls
130 lines (110 loc) · 3.39 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# 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.1,<3.2", "pyclibrary>=0.1.7"]
build-backend = "setuptools.build_meta"
[project]
name = "cuda-bindings"
description = "Python bindings for CUDA"
authors = [{name = "NVIDIA Corporation", email = "cuda-python-conduct@nvidia.com"},]
license = "LicenseRef-NVIDIA-SOFTWARE-LICENSE"
classifiers = [
"Intended Audience :: Developers",
"Topic :: Database",
"Topic :: Scientific/Engineering",
"Programming Language :: Python",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Environment :: GPU :: NVIDIA CUDA",
]
dynamic = [
"version",
"readme",
]
dependencies = [
"cuda-pathfinder ~=1.1",
]
[project.optional-dependencies]
all = [
"cuda-toolkit[nvrtc,nvjitlink,nvvm]==13.*",
"cuda-toolkit[cufile]==13.*; sys_platform == 'linux'",
]
test = [
"cython>=3.1,<3.2",
"setuptools>=77.0.0",
"numpy>=1.21.1",
"pytest>=6.2.4",
"pytest-benchmark>=3.4.1",
]
[project.urls]
Repository = "https://github.com/NVIDIA/cuda-python"
Documentation = "https://nvidia.github.io/cuda-python/"
[tool.setuptools.packages.find]
include = ["cuda*"]
[tool.setuptools.dynamic]
version = { attr = "cuda.bindings._version.__version__" }
readme = { file = ["DESCRIPTION.rst"], content-type = "text/x-rst" }
[tool.ruff]
line-length = 120
[tool.ruff.format]
docstring-code-format = true
exclude = ["cuda/bindings/_version.py"]
[tool.ruff.lint]
select = [
# pycodestyle Error
"E",
# Pyflakes
"F",
# pycodestyle Warning
"W",
# pyupgrade
"UP",
# flake8-bugbear
"B",
# flake8-simplify
"SIM",
# isort
"I",
]
ignore = [
"UP007",
"E741", # ambiguous variable name such as I
"B007", # rename unsued loop variable to _name
"UP035" # UP006, UP007, UP035 complain about deprecated Typing.<type> use, but disregard backward compatibility of python version
]
exclude = ["cuda/bindings/_version.py"]
[tool.ruff.lint.per-file-ignores]
"setup.py" = ["F401"]
"__init__.py" = ["F401"]
"examples/**/*" = [
"E722",
"E501" # line too long
]
"tests/**/*" = [
"E722",
"UP022",
"E402", # module level import not at top of file
"F841"] # F841 complains about unused variables, but some assignments have side-effects that could be useful for tests (func calls for example)
"benchmarks/**/*" = [
"E722",
"UP022",
"E402", # module level import not at top of file
"F841"] # F841 complains about unused variables, but some assignments have side-effects that could be useful for tests (func calls for example)
[tool.cibuildwheel]
skip = "*-musllinux_*"
enable = "cpython-freethreading"
build-verbosity = 1
environment-pass = ["CUDA_PATH", "CUDA_PYTHON_PARALLEL_LEVEL"]
[tool.cibuildwheel.linux]
archs = "native"
# CIBW mounts the host filesystem under /host
environment-pass = ["CUDA_PATH"]
environment = { CUDA_HOME = "/host/$CUDA_PATH" }
[tool.cibuildwheel.windows]
archs = "AMD64"
before-build = "pip install delvewheel"
repair-wheel-command = "delvewheel repair --namespace-pkg cuda -w {dest_dir} {wheel}"
environment = { CUDA_HOME = "$(cygpath -w $CUDA_PATH)" }