python310Packages.altair: 4.2.2 -> 5.0.1

This commit is contained in:
Valentin Chassignol
2023-07-26 14:18:13 +02:00
parent 09011d341e
commit dde249ab92
@@ -1,62 +1,74 @@
{ lib, buildPythonPackage, fetchPypi, isPy27
, entrypoints
, glibcLocales
, ipython
, jinja2
, jsonschema
, numpy
, pandas
, pytestCheckHook
{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, recommonmark
, six
, sphinx
# Runtime dependencies
, hatchling
, toolz
, typing ? null
, numpy
, jsonschema
, typing-extensions
, pandas
, jinja2
, importlib-metadata
# Build, dev and test dependencies
, ipython
, pytestCheckHook
, vega_datasets
, sphinx
}:
buildPythonPackage rec {
pname = "altair";
version = "4.2.2";
disabled = isPy27;
version = "5.0.1";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-OTmaJnxJsw0QLBBBHmerJjdBVqhLGuufzRUUBCm6ScU=";
src = fetchFromGitHub {
owner = "altair-viz";
repo = "altair";
rev = "refs/tags/v${version}";
hash = "sha256-7bTrfryu4oaodVGNFNlVk9vXmDA5/9ahvCmvUGzZ5OQ=";
};
nativeBuildInputs = [
hatchling
];
propagatedBuildInputs = [
entrypoints
jinja2
jsonschema
numpy
pandas
six
toolz
jinja2
] ++ lib.optionals (pythonOlder "3.5") [ typing ];
] ++ lib.optional (pythonOlder "3.8") importlib-metadata
++ lib.optional (pythonOlder "3.11") typing-extensions;
nativeCheckInputs = [
glibcLocales
ipython
pytestCheckHook
recommonmark
sphinx
vega_datasets
pytestCheckHook
];
pythonImportsCheck = [ "altair" ];
# avoid examples directory, which fetches web resources
preCheck = ''
cd altair/tests
'';
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"
];
meta = with lib; {
description = "A declarative statistical visualization library for Python.";
homepage = "https://github.com/altair-viz/altair";
homepage = "https://altair-viz.github.io";
downloadPage = "https://github.com/altair-viz/altair";
license = licenses.bsd3;
maintainers = with maintainers; [ teh ];
platforms = platforms.unix;
};
}