at 24.11-pre 1.4 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 pythonOlder, 5 fetchPypi, 6 isPyPy, 7 8 # build-system 9 setuptools, 10 11 # propagates 12 markupsafe, 13 14 # optional-dependencies 15 babel, 16 lingua, 17 18 # tests 19 chameleon, 20 mock, 21 pytestCheckHook, 22}: 23 24buildPythonPackage rec { 25 pname = "mako"; 26 version = "1.3.3"; 27 pyproject = true; 28 29 disabled = pythonOlder "3.7"; 30 31 src = fetchPypi { 32 pname = "Mako"; 33 inherit version; 34 hash = "sha256-4WwB2aucEfcpDu8c/vwJP7WkXuSj2gni/sLk0brlTnM="; 35 }; 36 37 nativeBuildInputs = [ setuptools ]; 38 39 propagatedBuildInputs = [ markupsafe ]; 40 41 passthru.optional-dependencies = { 42 babel = [ babel ]; 43 lingua = [ lingua ]; 44 }; 45 46 nativeCheckInputs = [ 47 chameleon 48 mock 49 pytestCheckHook 50 ] ++ lib.flatten (lib.attrValues passthru.optional-dependencies); 51 52 disabledTests = lib.optionals isPyPy [ 53 # https://github.com/sqlalchemy/mako/issues/315 54 "test_alternating_file_names" 55 # https://github.com/sqlalchemy/mako/issues/238 56 "test_file_success" 57 "test_stdin_success" 58 # fails on pypy2.7 59 "test_bytestring_passthru" 60 ]; 61 62 meta = with lib; { 63 description = "Super-fast templating language"; 64 mainProgram = "mako-render"; 65 homepage = "https://www.makotemplates.org/"; 66 changelog = "https://docs.makotemplates.org/en/latest/changelog.html"; 67 license = licenses.mit; 68 platforms = platforms.unix; 69 maintainers = with maintainers; [ domenkozar ]; 70 }; 71}