1{
2 lib,
3 stdenv,
4 buildPythonPackage,
5 isPy3k,
6 fetchPypi,
7 pytest,
8 markupsafe,
9 setuptools,
10}:
11
12buildPythonPackage rec {
13 pname = "Jinja2";
14 version = "2.11.3";
15 format = "setuptools";
16
17 src = fetchPypi {
18 inherit pname version;
19 sha256 = "a6d58433de0ae800347cab1fa3043cebbabe8baa9d29e668f1c768cb87a333c6";
20 };
21
22 nativeCheckInputs = [ pytest ];
23 propagatedBuildInputs = [
24 markupsafe
25 setuptools
26 ];
27
28 # Multiple tests run out of stack space on 32bit systems with python2.
29 # See https://github.com/pallets/jinja/issues/1158
30 # warnings are no longer being filtered correctly for python2
31 doCheck = !stdenv.hostPlatform.is32bit && isPy3k;
32
33 checkPhase = ''
34 pytest -v tests -W ignore::DeprecationWarning
35 '';
36
37 meta = with lib; {
38 homepage = "http://jinja.pocoo.org/";
39 description = "Stand-alone template engine";
40 license = licenses.bsd3;
41 longDescription = ''
42 Jinja2 is a template engine written in pure Python. It provides a
43 Django inspired non-XML syntax but supports inline expressions and
44 an optional sandboxed environment.
45 '';
46 maintainers = with maintainers; [ pierron ];
47 };
48}