commit:     ed8f87207bc94d4b745e0532fcbbaa4ee0713210
Author:     Z. Liu <zhixu.liu <AT> gmail <DOT> com>
AuthorDate: Thu Jul 24 10:06:26 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Oct 18 14:36:53 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ed8f8720

dev-python/nvidia-ml-py: add 12.575.51, new ebuild

requied by atopgpud to gather stats from nvidia gpus

Signed-off-by: Z. Liu <zhixu.liu <AT> gmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/43138
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-python/nvidia-ml-py/Manifest                   |  1 +
 dev-python/nvidia-ml-py/metadata.xml               | 21 +++++++++++
 .../nvidia-ml-py/nvidia-ml-py-12.575.51.ebuild     | 43 ++++++++++++++++++++++
 profiles/features/musl/package.mask                |  4 ++
 4 files changed, 69 insertions(+)

diff --git a/dev-python/nvidia-ml-py/Manifest b/dev-python/nvidia-ml-py/Manifest
new file mode 100644
index 000000000000..e44b0b5d9f82
--- /dev/null
+++ b/dev-python/nvidia-ml-py/Manifest
@@ -0,0 +1 @@
+DIST nvidia_ml_py-12.575.51.tar.gz 46597 BLAKE2B 
55e7a3dbced43e0bd0b37d9d1d9b11718ac6a37173af290e1f3507eb9c165fe049fe1d5422171374fc2e6b9471bb46c70ed84509e9d381e0aeec0ef00c763c38
 SHA512 
3132e9d8e601e88f036188f026ea5e6f0ae0358a8a381d2e8dcb363d4fe1f8aecbb31e0fb72555e32991df6c4c86c8c1713002f47094dc9afebd58c1cde1d2e2

diff --git a/dev-python/nvidia-ml-py/metadata.xml 
b/dev-python/nvidia-ml-py/metadata.xml
new file mode 100644
index 000000000000..03e89643b864
--- /dev/null
+++ b/dev-python/nvidia-ml-py/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+  <maintainer type="person" proxied="yes"> 
+    <email>[email protected]</email>
+    <name>Z. Liu</name>
+  </maintainer>
+  <maintainer type="project" proxied="proxy">
+    <email>[email protected]</email>
+    <name>Proxy Maintainers</name>
+  </maintainer>
+  <longdescription lang="en">
+    Provides a Python interface to GPU management and monitoring functions.
+    This is a wrapper around the NVML library. For information about the NVML
+    library, see the NVML developer page
+    http://developer.nvidia.com/nvidia-management-library-nvml
+  </longdescription>
+  <upstream>
+    <remote-id type="pypi">nvidia-ml-py</remote-id>
+  </upstream>
+</pkgmetadata>

diff --git a/dev-python/nvidia-ml-py/nvidia-ml-py-12.575.51.ebuild 
b/dev-python/nvidia-ml-py/nvidia-ml-py-12.575.51.ebuild
new file mode 100644
index 000000000000..6a5ea0fc993a
--- /dev/null
+++ b/dev-python/nvidia-ml-py/nvidia-ml-py-12.575.51.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2025 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
+}

diff --git a/profiles/features/musl/package.mask 
b/profiles/features/musl/package.mask
index 57c174724793..6801e3502803 100644
--- a/profiles/features/musl/package.mask
+++ b/profiles/features/musl/package.mask
@@ -1,6 +1,10 @@
 # Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
+# Z. Liu <[email protected]> (2025-10-18)
+# nvidia-drivers only works against glibc.
+dev-python/nvidia-ml-py
+
 # Robert Siebeck <[email protected]> (2025-10-17)
 # Binary compiled against glibc
 # Bug #964371

Reply via email to