depot/third_party/nixpkgs/pkgs/development/python-modules/objgraph/default.nix
Default email a0cb138ada Project import generated by Copybara.
GitOrigin-RevId: a100acd7bbf105915b0004427802286c37738fef
2023-02-02 18:25:31 +00:00

54 lines
990 B
Nix

{ lib
, buildPythonPackage
, fetchPypi
, graphviz
, 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;
hash = "sha256-R1LKW8wOBRLkG4zE0ngKwv07PqvQO36VClWUwGID38Q=";
};
patches = [
(substituteAll {
src = ./hardcode-graphviz-path.patch;
graphviz = graphvizPkgs;
})
];
propagatedBuildInputs = [
graphviz
];
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; [ ];
};
}