[svn] added doc notes to the installation instructions
[jinja2.git] / setup.py
1 # -*- coding: utf-8 -*-
2 """
3 Jinja
4 =====
5
6 Jinja 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.
8 It's basically a combination of Django templates and python code.
9
10 Nutshell
11 --------
12
13 Here 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
25 Philosophy
26 ----------
27
28 Application logic is for the controller but don't try to make the life for the
29 template designer too hard by giving him too few functionality.
30
31 For more informations visit the new `jinja webpage`_ and `documentation`_.
32
33 Note
34 ----
35
36 This 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
38 bugfixes but the 1.0 branch will be the only version that receives support.
39
40 If you have an application that uses Jinja 0.9 and won't be updated in the
41 near future the best idea is to ship a Jinja 0.9 checkout together with
42 the application.
43
44 The `Jinja trunk`_ is installable via `easy_install` with ``easy_install
45 Jinja==dev``.
46
47 .. _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
51 .. _Jinja trunk: http://trac.pocoo.org/repos/jinja/trunk#egg=Jinja-dev
52 """
53 import os
54 import ez_setup
55 ez_setup.use_setuptools()
56 from setuptools import setup
57
58
59 def 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
68 setup(
69     name = 'Jinja',
70     version = '1.0',
71     url = 'http://jinja.pocoo.org/',
72     license = 'BSD',
73     author = 'Armin Ronacher',
74     author_email = 'armin.ronacher@active-4.com',
75     description = 'A small but fast and easy to use stand-alone template '
76                   'engine written in pure python.',
77     long_description = __doc__,
78     # 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,
81     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',
88         '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'],
93     packages = ['jinja', 'jinja.translators'],
94     data_files = [
95         ('docs', list(list_files('docs/build'))),
96         ('docs/txt', list(list_files('docs/src')))
97     ],
98     platforms = 'any',
99     extras_require = {'plugin': ['setuptools>=0.6a2']}
100 )