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