blob: bbab812e1847ea50b6a46e637639e151340a5c8d [file] [log] [blame]
Armin Ronacherde478f62007-02-28 22:35:04 +01001# -*- coding: utf-8 -*-
Armin Ronacher69479122007-03-22 22:56:18 +01002"""
3Jinja
4=====
5
6Jinja is a `sandboxed`_ template engine written in pure Python. It provides a
7`Django`_ like non-XML syntax and compiles templates into executable python code.
8It's basically a combination of Django templates and python code.
9
10Nutshell
11--------
12
13Here a small example of a Jinja template::
14
15 {% extends 'base.html' %}
16 {% block title %}Memberlist{% endblock %}
17 {% block content %}
18 <ul>
19 {% for user in users %}
20 <li><a href="{{ user.url|e }}">{{ user.username|e }}</a></li>
21 {% endfor %}
22 </ul>
23 {% endblock %}
24
25Philosophy
26----------
27
28Application logic is for the controller but don't try to make the life for the
29template designer too hard by giving him too few functionality.
30
31For more informations visit the new `jinja webpage`_ and `documentation`_.
32
33Note
34----
35
36This is the Jinja 1.0 release which is completely incompatible with the old
37"pre 1.0" branch. The old branch will still receive security updates and
38bugfixes but the 1.0 branch will be the only version that receives support.
39
40If you have an application that uses Jinja 0.9 and won't be updated in the
41near future the best idea is to ship a Jinja 0.9 checkout together with
42the application.
43
Armin Ronacher36121f52007-03-23 16:24:23 +010044The `Jinja trunk`_ is installable via `easy_install` with ``easy_install
45Jinja==dev``.
46
Armin Ronacher69479122007-03-22 22:56:18 +010047.. _sandboxed: http://en.wikipedia.org/wiki/Sandbox_%28computer_security%29
48.. _Django: http://www.djangoproject.com/
49.. _jinja webpage: http://jinja.pocoo.org/
50.. _documentation: http://jinja.pocoo.org/documentation/index.html
Armin Ronacher36121f52007-03-23 16:24:23 +010051.. _Jinja trunk: http://trac.pocoo.org/repos/jinja/trunk#egg=Jinja-dev
Armin Ronacher69479122007-03-22 22:56:18 +010052"""
Armin Ronacher0830e252007-03-22 23:45:30 +010053import os
54import ez_setup
55ez_setup.use_setuptools()
Armin Ronacherde478f62007-02-28 22:35:04 +010056from setuptools import setup
57
Armin Ronacher0830e252007-03-22 23:45:30 +010058
Armin Ronachere21ced22007-03-22 23:57:10 +010059def list_files(path):
60 for fn in os.listdir(path):
61 if fn.startswith('.'):
62 continue
63 fn = os.path.join(path, fn)
64 if os.path.isfile(fn):
65 yield fn
66
67
Armin Ronacherde478f62007-02-28 22:35:04 +010068setup(
69 name = 'Jinja',
Armin Ronacher8ebf1f92007-03-03 11:22:18 +010070 version = '1.0',
71 url = 'http://jinja.pocoo.org/',
Armin Ronacherde478f62007-02-28 22:35:04 +010072 license = 'BSD',
73 author = 'Armin Ronacher',
74 author_email = '[email protected]',
Armin Ronacher2b765132007-03-13 16:48:10 +010075 description = 'A small but fast and easy to use stand-alone template '
76 'engine written in pure python.',
Armin Ronacher69479122007-03-22 22:56:18 +010077 long_description = __doc__,
Armin Ronachere21ced22007-03-22 23:57:10 +010078 # jinja is egg safe. But because we distribute the documentation
79 # in form of html and txt files it's a better idea to extract the files
80 zip_safe = False,
Armin Ronacherde478f62007-02-28 22:35:04 +010081 classifiers = [
82 'Development Status :: 5 - Production/Stable',
83 'Environment :: Web Environment',
84 'Intended Audience :: Developers',
85 'License :: OSI Approved :: BSD License',
86 'Operating System :: OS Independent',
87 'Programming Language :: Python',
Armin Ronacher8ebf1f92007-03-03 11:22:18 +010088 'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
89 'Topic :: Software Development :: Libraries :: Python Modules',
90 'Topic :: Text Processing :: Markup :: HTML'
91 ],
92 keywords = ['python.templating.engines'],
Armin Ronacher2b765132007-03-13 16:48:10 +010093 packages = ['jinja', 'jinja.translators'],
Armin Ronacher0830e252007-03-22 23:45:30 +010094 data_files = [
Armin Ronacher72bb2572007-03-23 17:24:48 +010095 ('docs', list(list_files('docs/build'))),
96 ('docs/txt', list(list_files('docs/src')))
Armin Ronacher0830e252007-03-22 23:45:30 +010097 ],
98 platforms = 'any',
99 extras_require = {'plugin': ['setuptools>=0.6a2']}
Armin Ronacherde478f62007-02-28 22:35:04 +0100100)