summaryrefslogtreecommitdiff
path: root/dev-python/nvidia-ml-py/nvidia-ml-py-13.590.44.ebuild
blob: 46a5c709078ccf03a66bf7df2d2be12797b2355c (plain)
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
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

DISTUTILS_USE_PEP517=setuptools
PYPI_PN=${PN/-/_}
PYTHON_COMPAT=( python3_{11..14} )
PYTHON_REQ_USE="threads(+)"

inherit distutils-r1 pypi

DESCRIPTION="Python bindings to the NVIDIA Management Library"
HOMEPAGE="
	https://pypi.org/project/nvidia-ml-py/
"

LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64"
IUSE="examples"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"

RDEPEND="
	${PYTHON_DEPS}
	x11-drivers/nvidia-drivers
"
DEPEND="${RDEPEND}"

src_prepare() {
	# don't install example.py
	sed -i "s/, 'example'//g" setup.py || die

	default
}

python_install_all() {
	distutils-r1_python_install_all

	if use examples; then
		dodoc -r example.py
	fi
}