Install this version:
emerge -a =dev-python/cuda-bindings-13.4.1
If this version is masked, you can unmask it using the autounmask tool or standard emerge options:
autounmask =dev-python/cuda-bindings-13.4.1
Or alternatively:
emerge --autounmask-write -a =dev-python/cuda-bindings-13.4.1
| Version | EAPI | Keywords | Slot |
|---|---|---|---|
| 13.4.1 | 8 | ~amd64 | 0 |
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_EXT=1
DISTUTILS_USE_PEP517=standalone
PYTHON_COMPAT=( python3_{12..14} )
inherit distutils-r1
DESCRIPTION="Python bindings for CUDA driver and runtime APIs"
HOMEPAGE="
https://github.com/NVIDIA/cuda-python
https://nvidia.github.io/cuda-python/cuda-bindings/
https://pypi.org/project/cuda-bindings/
"
# cuda-bindings uses bare v<PV> monorepo tags, unlike cuda-pathfinder's
# namespaced tags. # verified 2026-05-30
SRC_URI="
https://github.com/NVIDIA/cuda-python/archive/refs/tags/v${PV}.tar.gz
-> ${P}.gh.tar.gz
"
S="${WORKDIR}/cuda-python-${PV}/cuda_bindings"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64"
# The autouse context fixture requires an NVIDIA GPU.
RESTRICT="test"
# build_hooks.py parses CUDA headers with Cython 3.2.x. Required profiler
# headers make the toolkit's profiler USE flag mandatory.
RDEPEND="
>=dev-python/cuda-pathfinder-1.5[${PYTHON_USEDEP}]
dev-util/nvidia-cuda-toolkit:=[profiler]
"
DEPEND="${RDEPEND}"
# standalone adds no backend dependency, so require upstream's setuptools >=80
# directly. The build backend also imports cuda-pathfinder. # verified 2026-07-27
BDEPEND="
>=dev-python/pyclibrary-0.1.7[${PYTHON_USEDEP}]
>=dev-python/cuda-pathfinder-1.5[${PYTHON_USEDEP}]
>=dev-python/cython-3.2.5[${PYTHON_USEDEP}]
<dev-python/cython-3.3[${PYTHON_USEDEP}]
>=dev-python/setuptools-80[${PYTHON_USEDEP}]
>=dev-python/setuptools-scm-8[${PYTHON_USEDEP}]
|| (
<dev-python/setuptools-scm-10.1[${PYTHON_USEDEP}]
>=dev-python/setuptools-scm-10.1.1[${PYTHON_USEDEP}]
)
"
# build_hooks.py requires CUDA_HOME to locate headers.
export CUDA_HOME=/opt/cuda
# The archive lacks monorepo Git metadata, so supply a literal version. A
# v-prefixed value leaks into cuda.bindings.__version__ and breaks consumers
# such as cuda.core. # verified 2026-06-10
export SETUPTOOLS_SCM_PRETEND_VERSION_FOR_CUDA_BINDINGS="${PV}"
src_prepare() {
# Let Portage control stripping and preserve split-debug support.
sed -i -e '/extra_link_args += \["-Wl,--strip-all"\]/d' build_hooks.py || die
distutils-r1_src_prepare
}
>=dev-python/cuda-pathfinder-1.5[] dev-util/nvidia-cuda-toolkit:=[profiler]
>=dev-python/cuda-pathfinder-1.5[] dev-util/nvidia-cuda-toolkit:=[profiler]
>=dev-python/pyclibrary-0.1.7[${PYTHON_USEDEP}] >=dev-python/cuda-pathfinder-1.5[${PYTHON_USEDEP}] >=dev-python/cython-3.2.5[${PYTHON_USEDEP}] <dev-python/cython-3.3[${PYTHON_USEDEP}] >=dev-python/setuptools-80[${PYTHON_USEDEP}] >=dev-python/setuptools-scm-8[${PYTHON_USEDEP}] || ( <dev-python/setuptools-scm-10.1[${PYTHON_USEDEP}] >=dev-python/setuptools-scm-10.1.1[${PYTHON_USEDEP}] )
| Type | File | Size | Source URLs |
|---|---|---|---|
| DIST | cuda-bindings-13.4.1.gh.tar.gz | 3267635 bytes | https://github.com/NVIDIA/cuda-python/archive/refs/tags/v13.4.1.tar.gz |