3
0
Fork 0
forked from mirrors/nixpkgs

python310Packages.objgraph: switch to pytestCheckHook

- add adjust inputs
This commit is contained in:
Fabian Affolter 2023-01-26 16:38:23 +01:00
parent 03b3dff5b6
commit 6c04a024f7

View file

@ -1,25 +1,26 @@
{ lib
, buildPythonPackage
, fetchPypi
, isPyPy
, substituteAll
, graphvizPkgs
, graphviz
, mock
, graphvizPkgs
, isPyPy
, pytestCheckHook
, pythonOlder
, substituteAll
}:
buildPythonPackage rec {
pname = "objgraph";
version = "3.5.0";
format = "setuptools";
disabled = pythonOlder "3.5" || isPyPy;
src = fetchPypi {
inherit pname version;
sha256 = "4752ca5bcc0e0512e41b8cc4d2780ac2fd3b3eabd03b7e950a5594c06203dfc4";
hash = "sha256-R1LKW8wOBRLkG4zE0ngKwv07PqvQO36VClWUwGID38Q=";
};
# Tests fail with PyPy.
disabled = isPyPy;
patches = [
(substituteAll {
src = ./hardcode-graphviz-path.patch;
@ -27,14 +28,27 @@ buildPythonPackage rec {
})
];
propagatedBuildInputs = [ graphviz ];
propagatedBuildInputs = [
graphviz
];
nativeCheckInputs = [ mock ];
nativeCheckInputs = [
pytestCheckHook
];
pythonImportsCheck = [
"objgraph"
];
pytestFlagsArray = [
"tests.py"
];
meta = with lib; {
description = "Draws Python object reference graphs with graphviz";
homepage = "https://mg.pov.lt/objgraph/";
changelog = "https://github.com/mgedmin/objgraph/blob/${version}/CHANGES.rst";
license = licenses.mit;
maintainers = with maintainers; [ ];
};
}