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 The `Jinja2 tip`_ is installable via `easy_install` with ``easy_install
36 .. _sandboxed: http://en.wikipedia.org/wiki/Sandbox_(computer_security)
37 .. _Django: http://www.djangoproject.com/
38 .. _Jinja2 webpage: http://jinja.pocoo.org/
39 .. _documentation: http://jinja.pocoo.org/2/documentation/
40 .. _Jinja2 tip: http://dev.pocoo.org/hg/jinja2-main/archive/tip.tar.gz#egg=Jinja2-dev
45 from setuptools import setup, Extension, Feature
46 from distutils.command.build_ext import build_ext
48 debugsupport = Feature(
49 'optional C debug support',
52 Extension('jinja2._debugsupport', ['jinja2/_debugsupport.c']),
57 # tell distribute to use 2to3 with our own fixers.
59 if sys.version_info >= (3, 0):
62 use_2to3_fixers=['custom_fixers']
69 url='http://jinja.pocoo.org/',
71 author='Armin Ronacher',
72 author_email='armin.ronacher@active-4.com',
73 description='A small but fast and easy to use stand-alone template '
74 'engine written in pure python.',
75 long_description=__doc__,
76 # jinja is egg safe. But we hate eggs
79 'Development Status :: 5 - Production/Stable',
80 'Environment :: Web Environment',
81 'Intended Audience :: Developers',
82 'License :: OSI Approved :: BSD License',
83 'Operating System :: OS Independent',
84 'Programming Language :: Python',
85 'Programming Language :: Python :: 3',
86 'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
87 'Topic :: Software Development :: Libraries :: Python Modules',
88 'Topic :: Text Processing :: Markup :: HTML'
90 packages=['jinja2', 'jinja2.testsuite', 'jinja2.testsuite.res',
91 'jinja2._markupsafe'],
92 extras_require={'i18n': ['Babel>=0.8']},
93 test_suite='jinja2.testsuite.suite',
94 include_package_data=True,
97 jinja2 = jinja2.ext:babel_extract[i18n]
99 features={'debugsupport': debugsupport},