1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 jinja2, 6 numpy, 7 pandas, 8 pillow, 9 prettytable, 10 pytestCheckHook, 11 pythonOlder, 12 requests, 13 setuptools, 14 simplejson, 15}: 16 17buildPythonPackage rec { 18 pname = "pyecharts"; 19 version = "2.0.8"; 20 pyproject = true; 21 22 disabled = pythonOlder "3.8"; 23 24 src = fetchFromGitHub { 25 owner = "pyecharts"; 26 repo = "pyecharts"; 27 tag = "v${version}"; 28 hash = "sha256-Aax/HpYJRrfituiAIT7Y6F9v9tX9EmVXtr+4R98tces="; 29 }; 30 31 build-system = [ setuptools ]; 32 33 dependencies = [ 34 jinja2 35 prettytable 36 simplejson 37 ]; 38 39 optional-dependencies = { 40 images = [ pillow ]; 41 }; 42 43 nativeCheckInputs = [ 44 numpy 45 pandas 46 pytestCheckHook 47 requests 48 ] ++ lib.flatten (builtins.attrValues optional-dependencies); 49 50 pythonImportsCheck = [ "pyecharts" ]; 51 52 disabledTests = [ 53 # Tests require network access 54 "test_render_embed_js" 55 "test_display_javascript_v2" 56 "test_lines3d_base" 57 ]; 58 59 meta = { 60 description = "Python Echarts Plotting Library"; 61 homepage = "https://github.com/pyecharts/pyecharts"; 62 changelog = "https://github.com/pyecharts/pyecharts/releases/tag/v${version}"; 63 license = lib.licenses.mit; 64 maintainers = with lib.maintainers; [ fab ]; 65 }; 66}