nongnu: python-nvidia-ml-py: Revise package style.

* nongnu/packages/nvidia.scm (python-nvidia-ml-py)
[arguments] <#:phases>: Use search-input-file.
[synopsis, description]: Rewrite.
This commit is contained in:
Hilton Chain 2026-01-12 20:17:03 +08:00
parent 62829d8a05
commit 3964e7fc65
No known key found for this signature in database
GPG key ID: ACC66D09CA528292

View file

@ -1082,21 +1082,23 @@ simultaneous NVML calls from multiple threads.")
"09cnb7xasd7brby52j70y7fqsfm9n6gvgqf769v0cmj74ypy2s4g"))))
(build-system pyproject-build-system)
(arguments
(list #:tests? #f ;No tests in PyPi archive.
#:phases #~(modify-phases %standard-phases
(add-after 'unpack 'fix-libnvidia
(lambda _
(substitute* "pynvml.py"
(("libnvidia-ml.so.1")
(string-append #$(this-package-input
"nvidia-driver")
"/lib/libnvidia-ml.so.1"))))))))
(list
#:tests? #f ;No tests in PyPi archive.
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'fix-libnvidia
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "pynvml.py"
(("libnvidia-ml.so.1" file)
(search-input-file inputs (in-vicinity "lib" file)))))))))
(native-inputs (list python-setuptools))
(inputs (list nvidia-driver))
(home-page "https://forums.developer.nvidia.com")
(synopsis "Python Bindings for the NVIDIA Management Library")
(description "This package provides official Python Bindings for the NVIDIA
Management Library")
(synopsis "Python bindings to NVIDIA Management Library")
(description
"This package is a wrapper around @acronym{NVML, NVIDIA Management
Library}. It provides a Python interface to GPU management and monitoring
functions.")
(license license-gnu:bsd-3)))
(define-public python-py3nvml