1 # -*- coding: utf-8 -*-
6 Jinja2 is a template engine written in pure Python. It provides a
7 `Django`_ inspired non-XML syntax but supports inline expressions and
8 an optional `sandboxed`_ environment.
13 Here a small example of a Jinja template::
15 {% extends 'base.html' %}
16 {% block title %}Memberlist{% endblock %}
19 {% for user in users %}
20 <li><a href="{{ user.url }}">{{ user.username }}</a></li>
28 Application logic is for the controller but don't try to make the life
29 for the template designer too hard by giving him too few functionality.
31 For more informations visit the new `Jinja2 webpage`_ and `documentation`_.
33 .. _sandboxed: http://en.wikipedia.org/wiki/Sandbox_(computer_security)
34 .. _Django: http://www.djangoproject.com/
35 .. _Jinja2 webpage: http://jinja.pocoo.org/
36 .. _documentation: http://jinja.pocoo.org/2/documentation/
40 from setuptools import setup, Extension, Feature
42 debugsupport = Feature(
43 'optional C debug support',
46 Extension('jinja2._debugsupport', ['jinja2/_debugsupport.c']),
51 # tell distribute to use 2to3 with our own fixers.
53 if sys.version_info >= (3, 0):
56 use_2to3_fixers=['custom_fixers']
59 # ignore the old '--with-speedups' flag
61 speedups_pos = sys.argv.index('--with-speedups')
65 sys.argv[speedups_pos] = '--with-debugsupport'
66 sys.stderr.write('*' * 74 + '\n')
67 sys.stderr.write('WARNING:\n')
68 sys.stderr.write(' the --with-speedups flag is deprecated, assuming '
69 '--with-debugsupport\n')
70 sys.stderr.write(' For the actual speedups install the MarkupSafe '
72 sys.stderr.write('*' * 74 + '\n')
78 url='http://jinja.pocoo.org/',
80 author='Armin Ronacher',
81 author_email='armin.ronacher@active-4.com',
82 description='A small but fast and easy to use stand-alone template '
83 'engine written in pure python.',
84 long_description=__doc__,
85 # jinja is egg safe. But we hate eggs
88 'Development Status :: 5 - Production/Stable',
89 'Environment :: Web Environment',
90 'Intended Audience :: Developers',
91 'License :: OSI Approved :: BSD License',
92 'Operating System :: OS Independent',
93 'Programming Language :: Python',
94 'Programming Language :: Python :: 3',
95 'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
96 'Topic :: Software Development :: Libraries :: Python Modules',
97 'Topic :: Text Processing :: Markup :: HTML'
99 packages=['jinja2', 'jinja2.testsuite', 'jinja2.testsuite.res',
100 'jinja2._markupsafe'],
101 extras_require={'i18n': ['Babel>=0.8']},
102 test_suite='jinja2.testsuite.suite',
103 include_package_data=True,
106 jinja2 = jinja2.ext:babel_extract[i18n]
108 features={'debugsupport': debugsupport},