now. (#364)
- added support for translator comments if extracted via babel.
- added with-statement extension.
+- experimental Python 3 support.
Version 2.2.1
-------------
>>> env.compile_expression('var', undefined_to_none=False)()
Undefined
- **new in Jinja 2.1**
+ .. versionadded:: 2.1
"""
parser = Parser(self, source, state='variable')
exc_info = None
before it fails. If it cannot find any of the templates, it will
raise a :exc:`TemplatesNotFound` exception.
- .. versionadded:: 2.2
+ .. versionadded:: 2.3
"""
if not names:
raise TemplatesNotFound(message=u'Tried to select from an empty list '
Does a typecheck and dispatches to :meth:`select_template` if an
iterable of template names is given, otherwise to :meth:`get_template`.
- .. versionadded:: 2.2
+ .. versionadded:: 2.3
"""
if isinstance(template_name_or_list, basestring):
return self.get_template(template_name_or_list, parent, globals)
from distutils.command.build_ext import build_ext
from distutils.errors import CCompilerError, DistutilsPlatformError
+try:
+ from distutils.command.build_py import build_py_2to3 as build_py
+except ImportError:
+ from distutils.command.build_py import build_py
+
setup(
name='Jinja2',
entry_points="""
[babel.extractors]
jinja2 = jinja2.ext:babel_extract[i18n]
- """
+ """,
+ cmdclass=dict(build_py=build_py)
)