setup.py
This file
Path
setup.py
110 lines · 3.2 KiB · Python
Last changed by
master will be 2.6Armin Ronacherbefore adoption44e1f56
History of this fileTake it
1# -*- coding: utf-8 -*-2"""3Jinja24~~~~~~56Jinja2 is a template engine written in pure Python. It provides a7`Django`_ inspired non-XML syntax but supports inline expressions and8an optional `sandboxed`_ environment.910Nutshell11--------1213Here a small example of a Jinja template::1415 {% extends 'base.html' %}16 {% block title %}Memberlist{% endblock %}17 {% block content %}18 <ul>19 {% for user in users %}20 <li><a href="{{ user.url }}">{{ user.username }}</a></li>21 {% endfor %}22 </ul>23 {% endblock %}2425Philosophy26----------2728Application logic is for the controller but don't try to make the life29for the template designer too hard by giving him too few functionality.3031For more informations visit the new `Jinja2 webpage`_ and `documentation`_.3233.. _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/37"""38import sys3940from setuptools import setup, Extension, Feature4142debugsupport = Feature(43 'optional C debug support',44 standard=False,45 ext_modules = [46 Extension('jinja2._debugsupport', ['jinja2/_debugsupport.c']),47 ],48)495051# tell distribute to use 2to3 with our own fixers.52extra = {}53if sys.version_info >= (3, 0):54 extra.update(55 use_2to3=True,56 use_2to3_fixers=['custom_fixers']57 )5859# ignore the old '--with-speedups' flag60try:61 speedups_pos = sys.argv.index('--with-speedups')62except ValueError:63 pass64else: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 '71 'package.\n')72 sys.stderr.write('*' * 74 + '\n')737475setup(76 name='Jinja2',77 version='2.6',78 url='http://jinja.pocoo.org/',79 license='BSD',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 eggs86 zip_safe=False,87 classifiers=[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'98 ],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,104 entry_points="""105 [babel.extractors]106 jinja2 = jinja2.ext:babel_extract[i18n]107 """,108 features={'debugsupport': debugsupport},109 **extra110)