3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #212796 from fabaff/objgraph-fix

python310Packages.objgraph: switch to pytestCheckHook
This commit is contained in:
Fabian Affolter 2023-01-27 09:17:54 +01:00 committed by GitHub
commit 082f1eecc1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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