1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 jinja2,
6 pytestCheckHook,
7 pythonOlder,
8 setuptools-scm,
9 selenium,
10}:
11
12buildPythonPackage rec {
13 pname = "branca";
14 version = "0.8.1";
15 pyproject = true;
16
17 disabled = pythonOlder "3.8";
18
19 src = fetchFromGitHub {
20 owner = "python-visualization";
21 repo = "branca";
22 tag = "v${version}";
23 hash = "sha256-Gnr3ONqWpUNOGiOlyq77d9PxcDT8TjqTHYBGxH+V+xc=";
24 };
25
26 postPatch = ''
27 # We don't want flake8
28 rm setup.cfg
29 '';
30
31 build-system = [ setuptools-scm ];
32
33 dependencies = [ jinja2 ];
34
35 nativeCheckInputs = [
36 pytestCheckHook
37 selenium
38 ];
39
40 pythonImportsCheck = [ "branca" ];
41
42 disabledTestPaths = [
43 # Some tests require a browser
44 "tests/test_utilities.py"
45 "tests/test_iframe.py"
46 ];
47
48 disabledTests = [
49 "test_rendering_utf8_iframe"
50 "test_rendering_figure_notebook"
51 ];
52
53 meta = with lib; {
54 description = "Generate complex HTML+JS pages with Python";
55 homepage = "https://github.com/python-visualization/branca";
56 changelog = "https://github.com/python-visualization/branca/blob/v${version}/CHANGES.txt";
57 license = with licenses; [ mit ];
58 maintainers = [ ];
59 };
60}