nixpkgs/pkgs/development/python-modules/perfplot/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

54 lines
1.2 KiB
Nix
Raw Normal View History

2019-05-20 10:54:54 -04:00
{
lib,
stdenv,
2019-05-20 10:54:54 -04:00
buildPythonPackage,
fetchFromGitHub,
flit-core,
2019-05-20 10:54:54 -04:00
matplotlib,
2023-07-01 13:31:46 +09:00
matplotx,
2019-05-20 10:54:54 -04:00
numpy,
rich,
pytestCheckHook,
pythonOlder,
2019-05-20 10:54:54 -04:00
}:
buildPythonPackage rec {
pname = "perfplot";
version = "0.10.2";
format = "pyproject";
disabled = pythonOlder "3.7";
2019-05-20 10:54:54 -04:00
src = fetchFromGitHub {
owner = "nschloe";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-bu6eYQukhLE8sLkS3PbqTgXOqJFXJYXTcXAhmjaq48g=";
2019-05-20 10:54:54 -04:00
};
nativeBuildInputs = [ flit-core ];
2019-05-20 10:54:54 -04:00
propagatedBuildInputs = [
matplotlib
2023-07-01 13:31:46 +09:00
matplotx
2019-05-20 10:54:54 -04:00
numpy
rich
2019-05-20 10:54:54 -04:00
];
# This variable is needed to suppress the "Trace/BPT trap: 5" error in Darwin's checkPhase.
# Not sure of the details, but we can avoid it by changing the matplotlib backend during testing.
env.MPLBACKEND = lib.optionalString stdenv.isDarwin "Agg";
nativeCheckInputs = [ pytestCheckHook ];
2019-05-20 10:54:54 -04:00
pythonImportsCheck = [ "perfplot" ];
2019-05-20 10:54:54 -04:00
meta = with lib; {
description = "Performance plots for Python code snippets";
homepage = "https://github.com/nschloe/perfplot";
changelog = "https://github.com/nschloe/perfplot/releases/tag/v${version}";
2019-05-20 10:54:54 -04:00
license = licenses.mit;
maintainers = with maintainers; [ ];
2019-05-20 10:54:54 -04:00
};
}