1 # -*- coding: utf-8 -*-
5 ez_setup.use_setuptools()
7 from distutils.command.build_ext import build_ext
8 from distutils.errors import CCompilerError
9 from setuptools import setup, Extension, Feature
10 from inspect import getdoc
14 for fn in os.listdir(path):
15 if fn.startswith('.'):
17 fn = os.path.join(path, fn)
18 if os.path.isfile(fn):
22 class optional_build_ext(build_ext):
24 def build_extension(self, ext):
26 build_ext.build_extension(self, ext)
27 except CCompilerError, e:
30 print ' the speedup extension could not be compiled, jinja will'
31 print ' fall back to the native python classes.'
41 url = 'http://jinja.pocoo.org/',
43 author = 'Armin Ronacher',
44 author_email = 'armin.ronacher@active-4.com',
45 description = 'A small but fast and easy to use stand-alone template '
46 'engine written in pure python.',
47 long_description = getdoc(jinja),
48 # jinja is egg safe. But because we distribute the documentation
49 # in form of html and txt files it's a better idea to extract the files
52 'Development Status :: 5 - Production/Stable',
53 'Environment :: Web Environment',
54 'Intended Audience :: Developers',
55 'License :: OSI Approved :: BSD License',
56 'Operating System :: OS Independent',
57 'Programming Language :: Python',
58 'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
59 'Topic :: Software Development :: Libraries :: Python Modules',
60 'Topic :: Text Processing :: Markup :: HTML'
62 keywords = ['python.templating.engines'],
63 packages = ['jinja', 'jinja.translators'],
65 ('docs', list(list_files('docs/build'))),
66 ('docs/txt', list(list_files('docs/src')))
70 [python.templating.engines]
71 jinja = jinja.plugin:BuffetPlugin
73 extras_require = {'plugin': ['setuptools>=0.6a2']},
74 features = {'speedups': Feature(
75 'optional C-speed enhancements',
78 Extension('jinja._speedups', ['jinja/_speedups.c'])
81 cmdclass = {'build_ext': optional_build_ext}