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.7.2";
15 format = "setuptools";
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchFromGitHub {
20 owner = "python-visualization";
21 repo = pname;
22 rev = "refs/tags/v${version}";
23 hash = "sha256-ipu0JZIx/YgR7F5Z7sl/9YEEHkyiDllR5dHko7AlSe8=";
24 };
25
26 postPatch = ''
27 # We don't want flake8
28 rm setup.cfg
29 '';
30
31 nativeBuildInputs = [ setuptools-scm ];
32
33 propagatedBuildInputs = [ 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 ];
46
47 disabledTests = [
48 "test_rendering_utf8_iframe"
49 "test_rendering_figure_notebook"
50 ];
51
52 meta = with lib; {
53 description = "Generate complex HTML+JS pages with Python";
54 homepage = "https://github.com/python-visualization/branca";
55 changelog = "https://github.com/python-visualization/branca/blob/v${version}/CHANGES.txt";
56 license = with licenses; [ mit ];
57 maintainers = with lib.maintainers; [ ];
58 };
59}