evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / development / python-modules / markdown-it-py / default.nix
blob3f0af08d192a47a7a3d2d6de6fc4cbf2047c9d9e
2   lib,
3   attrs,
4   buildPythonPackage,
5   commonmark,
6   fetchFromGitHub,
7   flit-core,
8   linkify-it-py,
9   markdown,
10   mdit-py-plugins,
11   mdurl,
12   mistletoe,
13   mistune,
14   myst-parser,
15   panflute,
16   pyyaml,
17   sphinx,
18   sphinx-book-theme,
19   sphinx-copybutton,
20   sphinx-design,
21   stdenv,
22   pytest-regressions,
23   pytestCheckHook,
24   pythonOlder,
27 buildPythonPackage rec {
28   pname = "markdown-it-py";
29   version = "3.0.0";
30   format = "pyproject";
32   disabled = pythonOlder "3.6";
34   src = fetchFromGitHub {
35     owner = "executablebooks";
36     repo = pname;
37     rev = "refs/tags/v${version}";
38     hash = "sha256-cmjLElJA61EysTUFMVY++Kw0pI4wOIXOyCY3To9fpQc=";
39   };
41   # fix downstrem usage of markdown-it-py[linkify]
42   pythonRelaxDeps = [ "linkify-it-py" ];
44   nativeBuildInputs = [
45     flit-core
46   ];
48   propagatedBuildInputs = [ mdurl ];
50   nativeCheckInputs = [
51     pytest-regressions
52     pytestCheckHook
53   ] ++ optional-dependencies.linkify;
55   # disable and remove benchmark tests
56   preCheck = ''
57     rm -r benchmarking
58   '';
59   doCheck = !stdenv.hostPlatform.isi686;
61   pythonImportsCheck = [ "markdown_it" ];
63   optional-dependencies = {
64     compare = [
65       commonmark
66       markdown
67       mistletoe
68       mistune
69       panflute
70     ];
71     linkify = [ linkify-it-py ];
72     plugins = [ mdit-py-plugins ];
73     rtd = [
74       attrs
75       myst-parser
76       pyyaml
77       sphinx
78       sphinx-copybutton
79       sphinx-design
80       sphinx-book-theme
81     ];
82   };
84   meta = with lib; {
85     description = "Markdown parser in Python";
86     homepage = "https://markdown-it-py.readthedocs.io/";
87     changelog = "https://github.com/executablebooks/markdown-it-py/blob/${src.rev}/CHANGELOG.md";
88     license = licenses.mit;
89     maintainers = with maintainers; [ bhipple ];
90     mainProgram = "markdown-it";
91   };