Merge pull request #293631 from dotlambda/pynvml-refactor

python311Packages.pynvml: refactor

Changed files
+21 -7
pkgs
development
python-modules
pynvml
+21 -7
pkgs/development/python-modules/pynvml/default.nix
···
{ lib
, buildPythonPackage
-
, fetchPypi
, substituteAll
, pythonOlder
, addOpenGLRunpath
}:
buildPythonPackage rec {
pname = "pynvml";
version = "11.5.0";
-
format = "setuptools";
disabled = pythonOlder "3.6";
-
src = fetchPypi {
-
inherit pname version;
-
hash = "sha256-0CeyG5WxCIufwngRf59ht8Z/jjOnh+n4P3NfD3GsMtA=";
};
patches = [
···
})
];
-
doCheck = false; # no tests in PyPi dist
pythonImportsCheck = [ "pynvml" "pynvml.smi" ];
meta = with lib; {
description = "Python bindings for the NVIDIA Management Library";
-
homepage = "https://www.nvidia.com";
license = licenses.bsd3;
maintainers = [ maintainers.bcdarwin ];
};
···
{ lib
, buildPythonPackage
+
, fetchFromGitHub
, substituteAll
, pythonOlder
, addOpenGLRunpath
+
, setuptools
+
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "pynvml";
version = "11.5.0";
+
pyproject = true;
disabled = pythonOlder "3.6";
+
src = fetchFromGitHub {
+
owner = "gpuopenanalytics";
+
repo = "pynvml";
+
rev = "refs/tags/${version}";
+
hash = "sha256-K3ZENjgi+TVDxr55dRK1y8SwzfgVIzcnD4oEI+KHRa4=";
};
patches = [
···
})
];
+
nativeBuildInputs = [
+
setuptools
+
];
+
pythonImportsCheck = [ "pynvml" "pynvml.smi" ];
+
nativeCheckInputs = [
+
pytestCheckHook
+
];
+
+
# OSError: /run/opengl-driver/lib/libnvidia-ml.so.1: cannot open shared object file: No such file or directory
+
doCheck = false;
+
meta = with lib; {
description = "Python bindings for the NVIDIA Management Library";
+
homepage = "https://github.com/gpuopenanalytics/pynvml";
license = licenses.bsd3;
maintainers = [ maintainers.bcdarwin ];
};