zizmor: 1.0.0 -> 1.0.1 (#371951)
[NixPkgs.git] / pkgs / development / python-modules / mako / default.nix
blob0735cf8f2c9e710b2de5723521bb0ab9639b398b
2   stdenv,
3   lib,
4   buildPythonPackage,
5   pythonOlder,
6   fetchPypi,
7   isPyPy,
9   # build-system
10   setuptools,
12   # propagates
13   markupsafe,
15   # optional-dependencies
16   babel,
17   lingua,
19   # tests
20   chameleon,
21   mock,
22   pytestCheckHook,
25 buildPythonPackage rec {
26   pname = "mako";
27   version = "1.3.5";
28   pyproject = true;
30   disabled = pythonOlder "3.7";
32   src = fetchPypi {
33     pname = "Mako";
34     inherit version;
35     hash = "sha256-SNvCBWjB0naiaYs22Wj6dhYb8ScZSQfqb8WU+oH5Q7w=";
36   };
38   nativeBuildInputs = [ setuptools ];
40   propagatedBuildInputs = [ markupsafe ];
42   optional-dependencies = {
43     babel = [ babel ];
44     lingua = [ lingua ];
45   };
47   nativeCheckInputs = [
48     chameleon
49     mock
50     pytestCheckHook
51   ] ++ lib.flatten (lib.attrValues optional-dependencies);
53   disabledTests =
54     lib.optionals isPyPy [
55       # https://github.com/sqlalchemy/mako/issues/315
56       "test_alternating_file_names"
57       # https://github.com/sqlalchemy/mako/issues/238
58       "test_file_success"
59       "test_stdin_success"
60       # fails on pypy2.7
61       "test_bytestring_passthru"
62     ]
63     # https://github.com/sqlalchemy/mako/issues/408
64     ++ lib.optional (stdenv.targetPlatform.useLLVM or false) "test_future_import";
66   meta = with lib; {
67     description = "Super-fast templating language";
68     mainProgram = "mako-render";
69     homepage = "https://www.makotemplates.org/";
70     changelog = "https://docs.makotemplates.org/en/latest/changelog.html";
71     license = licenses.mit;
72     platforms = platforms.unix;
73     maintainers = with maintainers; [ domenkozar ];
74   };