summary refs log tree commit diff
path: root/pkgs/development/python-modules/html5lib/default.nix
blob: 82b4818070990d47d34a4257c6a77d77ad999e77 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
{ lib
, buildPythonPackage
, fetchPypi
, flake8
, pytest_4
, pytest-expect
, mock
, six
, webencodings
}:

buildPythonPackage rec {
  pname = "html5lib";
  version = "1.0.1";

  src = fetchPypi {
    inherit pname version;
    sha256 = "66cb0dcfdbbc4f9c3ba1a63fdb511ffdbd4f513b2b6d81b80cd26ce6b3fb3736";
  };

  checkInputs = [ flake8 pytest_4 pytest-expect mock ];
  propagatedBuildInputs = [
    six webencodings
  ];

  checkPhase = ''
    # remove test causing error
    # https://github.com/html5lib/html5lib-python/issues/411
    rm html5lib/tests/test_stream.py
    py.test
  '';

  meta = {
    homepage = https://github.com/html5lib/html5lib-python;
    downloadPage = https://github.com/html5lib/html5lib-python/releases;
    description = "HTML parser based on WHAT-WG HTML5 specification";
    longDescription = ''
      html5lib is a pure-python library for parsing HTML. It is designed to
      conform to the WHATWG HTML specification, as is implemented by all
      major web browsers.
    '';
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ domenkozar prikhi ];
  };
}