depot/third_party/nixpkgs/pkgs/development/python-modules/dvc-render/default.nix
Default email 23b612e36f Project import generated by Copybara.
GitOrigin-RevId: ae5c332cbb5827f6b1f02572496b141021de335f
2024-01-25 23:12:00 +09:00

69 lines
1.3 KiB
Nix

{ lib
, stdenv
, buildPythonPackage
, fetchFromGitHub
, flatten-dict
, funcy
, matplotlib
, tabulate
, pytestCheckHook
, pytest-mock
, pytest-test-utils
, pythonOlder
, setuptools-scm
}:
buildPythonPackage rec {
pname = "dvc-render";
version = "1.0.1";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "iterative";
repo = "dvc-render";
rev = "refs/tags/${version}";
hash = "sha256-7rmmhf6Y6teoHR8u1+Ce1Xq0rdtC1/MWLXb282OOEnc=";
};
nativeBuildInputs = [
setuptools-scm
];
passthru.optional-dependencies = {
table = [
flatten-dict
tabulate
];
markdown = [
tabulate
matplotlib
];
};
nativeCheckInputs = [
funcy
pytestCheckHook
pytest-mock
pytest-test-utils
]
++ passthru.optional-dependencies.table
++ passthru.optional-dependencies.markdown;
disabledTestPaths = lib.optionals stdenv.isDarwin [
"tests/test_vega.py"
];
pythonImportsCheck = [
"dvc_render"
];
meta = with lib; {
description = "Library for rendering DVC plots";
homepage = "https://github.com/iterative/dvc-render";
changelog = "https://github.com/iterative/dvc-render/releases/tag/${version}";
license = licenses.asl20;
maintainers = with maintainers; [ fab ];
};
}