setup.py 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. from setuptools import setup, find_packages
  2. import os
  3. import re
  4. import sys
  5. v = open(os.path.join(os.path.dirname(__file__), 'mako', '__init__.py'))
  6. VERSION = re.compile(r".*__version__ = '(.*?)'", re.S).match(v.read()).group(1)
  7. v.close()
  8. readme = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()
  9. markupsafe_installs = (
  10. sys.version_info >= (2, 6) and sys.version_info < (3, 0)
  11. ) or sys.version_info >= (3, 3)
  12. if markupsafe_installs:
  13. install_requires = ['MarkupSafe>=0.9.2']
  14. else:
  15. install_requires = []
  16. setup(name='Mako',
  17. version=VERSION,
  18. description="A super-fast templating language that borrows the \
  19. best ideas from the existing templating languages.",
  20. long_description=readme,
  21. classifiers=[
  22. 'Development Status :: 5 - Production/Stable',
  23. 'Environment :: Web Environment',
  24. 'Intended Audience :: Developers',
  25. 'Programming Language :: Python',
  26. 'Programming Language :: Python :: 3',
  27. "Programming Language :: Python :: Implementation :: CPython",
  28. "Programming Language :: Python :: Implementation :: PyPy",
  29. 'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
  30. ],
  31. keywords='templates',
  32. author='Mike Bayer',
  33. author_email='mike@zzzcomputing.com',
  34. url='http://www.makotemplates.org/',
  35. license='MIT',
  36. packages=find_packages('.', exclude=['examples*', 'test*']),
  37. scripts=['scripts/mako-render'],
  38. tests_require=['nose >= 0.11'],
  39. test_suite="nose.collector",
  40. zip_safe=False,
  41. install_requires=install_requires,
  42. extras_require={'beaker': ['Beaker>=1.1']},
  43. entry_points="""
  44. [python.templating.engines]
  45. mako = mako.ext.turbogears:TGPlugin
  46. [pygments.lexers]
  47. mako = mako.ext.pygmentplugin:MakoLexer
  48. html+mako = mako.ext.pygmentplugin:MakoHtmlLexer
  49. xml+mako = mako.ext.pygmentplugin:MakoXmlLexer
  50. js+mako = mako.ext.pygmentplugin:MakoJavascriptLexer
  51. css+mako = mako.ext.pygmentplugin:MakoCssLexer
  52. [babel.extractors]
  53. mako = mako.ext.babelplugin:extract
  54. """
  55. )