blob: 69d32b22af33fab3b2dde2a6484ca3c0ee6af769 [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
44.. _sandboxed: http://en.wikipedia.org/wiki/Sandbox_%28computer_security%29
45.. _Django: http://www.djangoproject.com/
46.. _jinja webpage: http://jinja.pocoo.org/
47.. _documentation: http://jinja.pocoo.org/documentation/index.html
48"""
Armin Ronacher0830e252007-03-22 23:45:30 +010049import os
50import ez_setup
51ez_setup.use_setuptools()
Armin Ronacherde478f62007-02-28 22:35:04 +010052from setuptools import setup
53
Armin Ronacher0830e252007-03-22 23:45:30 +010054
Armin Ronachere21ced22007-03-22 23:57:10 +010055def list_files(path):
56 for fn in os.listdir(path):
57 if fn.startswith('.'):
58 continue
59 fn = os.path.join(path, fn)
60 if os.path.isfile(fn):
61 yield fn
62
63
Armin Ronacherde478f62007-02-28 22:35:04 +010064setup(
65 name = 'Jinja',
Armin Ronacher8ebf1f92007-03-03 11:22:18 +010066 version = '1.0',
67 url = 'http://jinja.pocoo.org/',
Armin Ronacherde478f62007-02-28 22:35:04 +010068 license = 'BSD',
69 author = 'Armin Ronacher',
70 author_email = 'armin.ronacher@active-4.com',
Armin Ronacher2b765132007-03-13 16:48:10 +010071 description = 'A small but fast and easy to use stand-alone template '
72 'engine written in pure python.',
Armin Ronacher69479122007-03-22 22:56:18 +010073 long_description = __doc__,
Armin Ronachere21ced22007-03-22 23:57:10 +010074 # jinja is egg safe. But because we distribute the documentation
75 # in form of html and txt files it's a better idea to extract the files
76 zip_safe = False,
Armin Ronacherde478f62007-02-28 22:35:04 +010077 classifiers = [
78 'Development Status :: 5 - Production/Stable',
79 'Environment :: Web Environment',
80 'Intended Audience :: Developers',
81 'License :: OSI Approved :: BSD License',
82 'Operating System :: OS Independent',
83 'Programming Language :: Python',
Armin Ronacher8ebf1f92007-03-03 11:22:18 +010084 'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
85 'Topic :: Software Development :: Libraries :: Python Modules',
86 'Topic :: Text Processing :: Markup :: HTML'
87 ],
88 keywords = ['python.templating.engines'],
Armin Ronacher2b765132007-03-13 16:48:10 +010089 packages = ['jinja', 'jinja.translators'],
Armin Ronacher0830e252007-03-22 23:45:30 +010090 data_files = [
Armin Ronachere21ced22007-03-22 23:57:10 +010091 ('docs', list_files('docs/build')),
92 ('docs/txt', list_files('docs/src'))
Armin Ronacher0830e252007-03-22 23:45:30 +010093 ],
94 platforms = 'any',
95 extras_require = {'plugin': ['setuptools>=0.6a2']}
Armin Ronacherde478f62007-02-28 22:35:04 +010096)