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 (112 loc) · 4 KB
/
Copy pathpyproject.toml
File metadata and controls
130 lines (112 loc) · 4 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) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0
[build-system]
requires = ["setuptools>=77.0.0", "Cython>=3.1"]
build-backend = "setuptools.build_meta"
[project]
name = "cuda-core"
dynamic = [
"version",
"readme",
]
requires-python = '>=3.9'
description = "cuda.core: (experimental) pythonic CUDA module"
authors = [
{ name = "NVIDIA Corporation" }
]
license = "Apache-2.0"
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Intended Audience :: End Users/Desktop",
"Natural Language :: English",
"Operating System :: POSIX :: Linux",
"Operating System :: Microsoft :: Windows",
"Topic :: Education",
"Topic :: Scientific/Engineering",
"Topic :: Software Development :: Libraries",
"Programming Language :: Python :: 3 :: Only",
"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",
"Programming Language :: Python :: Implementation :: CPython",
"Environment :: GPU :: NVIDIA CUDA",
"Environment :: GPU :: NVIDIA CUDA :: 11",
"Environment :: GPU :: NVIDIA CUDA :: 12",
]
dependencies = [
"numpy",
]
[project.optional-dependencies]
cu11 = ["cuda-bindings[all]==11.8.*"]
cu12 = ["cuda-bindings[all]==12.*"]
cu13 = ["cuda-bindings[all]==13.*"]
# TODO: these should all be in development dependencies; optional dependencies
# are for features exposed to *users*, not a dumping ground for all tooling
# needed to build and test the project
test = ["cython>=3.1", "setuptools", "pytest>=6.2.4"]
test-cu11 = ["cuda-core[test]", "cupy-cuda11x; python_version < '3.14'", "cuda-toolkit[cudart]==11.*"] # runtime headers needed by CuPy
test-cu12 = ["cuda-core[test]", "cupy-cuda12x; python_version < '3.14'", "cuda-toolkit[cudart]==12.*"] # runtime headers needed by CuPy
test-cu13 = ["cuda-core[test]", "cupy-cuda13x; python_version < '3.14'", "cuda-toolkit[cudart]==13.*"] # runtime headers needed by CuPy
# free threaded build, cupy doesn't support free-threaded builds yet, so avoid installing it for now
# TODO: cupy should support free threaded builds
test-cu13-ft = ["cuda-core[test]", "cuda-toolkit[cudart]==13.*"]
[project.urls]
homepage = "https://nvidia.github.io/cuda-python/"
documentation = "https://nvidia.github.io/cuda-python/cuda-core/"
repository = "https://github.com/NVIDIA/cuda-python/tree/main/cuda_core"
issues = "https://github.com/NVIDIA/cuda-python/issues/"
[tool.setuptools.packages.find]
include = ["cuda.core*"]
[tool.setuptools.package-data]
"cuda.core.experimental.include" = ["*.h", "*.hpp", "*.cuh"]
[tool.setuptools.dynamic]
version = { attr = "cuda.core._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/core/_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/core/_version.py"]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"]
"setup.py" = ["F401"]
[tool.cibuildwheel]
skip = "*-musllinux_*"
enable = "cpython-freethreading"
build-verbosity = 1
environment-pass = ["CUDA_PYTHON_PARALLEL_LEVEL"]
[tool.cibuildwheel.linux]
archs = "native"
[tool.cibuildwheel.windows]
archs = "AMD64"
before-build = "pip install delvewheel"
repair-wheel-command = "delvewheel repair --namespace-pkg cuda -w {dest_dir} {wheel}"