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

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

81 lines
1.7 KiB
Nix
Raw Normal View History

{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
# Runtime dependencies
, hatchling
, toolz
2019-08-07 02:00:18 +00:00
, numpy
, jsonschema
, typing-extensions
2019-08-07 02:00:18 +00:00
, pandas
, jinja2
, packaging
# Build, dev and test dependencies
, anywidget
, ipython
2022-02-06 18:45:29 +00:00
, pytestCheckHook
2019-08-07 02:00:18 +00:00
, vega_datasets
, sphinx
2019-08-07 02:00:18 +00:00
}:
buildPythonPackage rec {
pname = "altair";
# current version, 5.0.1, is broken with jsonschema>=4.18
# we use unstable version instead of patch due to many changes
version = "unstable-2023-08-12";
format = "pyproject";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "altair-viz";
repo = "altair";
rev = "56b3b66daae7160c8d82777d2646131afcc3dab4";
hash = "sha256-uVE3Bth1D1mIhaULB4IxEtOzhQd51Pscqyfdys65F6A=";
};
nativeBuildInputs = [
hatchling
];
2019-08-07 02:00:18 +00:00
propagatedBuildInputs = [
jinja2
2019-08-07 02:00:18 +00:00
jsonschema
numpy
packaging
2019-08-07 02:00:18 +00:00
pandas
toolz
] ++ lib.optional (pythonOlder "3.11") typing-extensions;
nativeCheckInputs = [
anywidget
2019-08-07 02:00:18 +00:00
ipython
sphinx
vega_datasets
pytestCheckHook
2019-08-07 02:00:18 +00:00
];
2018-03-20 15:33:08 +00:00
pythonImportsCheck = [ "altair" ];
disabledTestPaths = [
# Disabled because it requires internet connectivity
"tests/test_examples.py"
# TODO: Disabled because of missing altair_viewer package
"tests/vegalite/v5/test_api.py"
# avoid updating files and dependency on black
"tests/test_toplevel.py"
# require vl-convert package
"tests/utils/test_compiler.py"
];
meta = with lib; {
description = "A declarative statistical visualization library for Python.";
homepage = "https://altair-viz.github.io";
downloadPage = "https://github.com/altair-viz/altair";
license = licenses.bsd3;
2023-06-16 11:45:44 +00:00
maintainers = with maintainers; [ teh vinetos ];
};
}