setup.py
This file
Path
setup.py
118 lines · 3.6 KiB · Python
Last changed by
Tip is 2.2Armin Ronacherbefore adoption92af756
History of this fileTake it
The walk stopped after 200 commits: lines older than 132757b point at it.
added unittest for context import/includesArmin Ronacherbefore adoption132757b
lines 1–30why, one step back1# -*- 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.30small fix for Python 2.4Armin Ronacherbefore adoptionf4e1fb4
line 31why, one step back31For more informations visit the new `Jinja2 webpage`_ and `documentation`_.added unittest for context import/includesArmin Ronacherbefore adoption132757b
lines 32–37why, one step back3233The `Jinja2 tip`_ is installable via `easy_install` with ``easy_install34Jinja2==dev``.3536.. _sandboxed: http://en.wikipedia.org/wiki/Sandbox_(computer_security)37.. _Django: http://www.djangoproject.com/small fix for Python 2.4Armin Ronacherbefore adoptionf4e1fb4
line 38why, one step back38.. _Jinja2 webpage: http://jinja.pocoo.org/release trying #3: fixed typos in description :)Armin Ronacherbefore adoption1a12c8a
lines 39–40why, one step back39.. _documentation: http://jinja.pocoo.org/2/documentation/40.. _Jinja2 tip: http://dev.pocoo.org/hg/jinja2-main/archive/tip.tar.gz#egg=Jinja2-devadded unittest for context import/includesArmin Ronacherbefore adoption132757b
lines 41–49why, one step back41"""42import os43import sys4445from setuptools import setup, Extension, Feature46from distutils.command.build_ext import build_ext47from distutils.errors import CCompilerError, DistutilsPlatformError4849make -> fabArmin Ronacherbefore adoptiond43f926
lines 50–51why, one step back50#: don't change the variable and assignment. the fabfile parses this51#: file to get the version for deployment from it.Tip is 2.2Armin Ronacherbefore adoption92af756
line 52why, one step back52VERSION = '2.2'make -> fabArmin Ronacherbefore adoptiond43f926
lines 53–54why, one step back5354data files are optional nowArmin Ronacherbefore adoption58f351d
lines 55–64why, one step back55data_files = []56documentation_path = 'docs/_build/html'57if os.path.exists(documentation_path):58 documentation_files = []59 for fn in os.listdir(documentation_path):60 if not fn.startswith('.'):61 fn = os.path.join(documentation_path, fn)62 if os.path.isfile(fn):63 documentation_files.append(fn)64 data_files.append(('docs', documentation_files))added unittest for context import/includesArmin Ronacherbefore adoption132757b
lines 65–80why, one step back656667def get_terminal_width():68 """Return the current terminal dimensions."""69 try:70 from struct import pack, unpack71 from fcntl import ioctl72 from termios import TIOCGWINSZ73 s = pack('HHHH', 0, 0, 0, 0)74 return unpack('HHHH', ioctl(sys.stdout.fileno(), TIOCGWINSZ, s))[1]75 except:76 return 80777879setup(80 name='Jinja2',make -> fabArmin Ronacherbefore adoptiond43f926
line 81why, one step back81 version=VERSION,added unittest for context import/includesArmin Ronacherbefore adoption132757b
lines 82–92why, one step back82 url='http://jinja.pocoo.org/',83 license='BSD',84 author='Armin Ronacher',85 author_email='armin.ronacher@active-4.com',86 description='A small but fast and easy to use stand-alone template '87 'engine written in pure python.',88 long_description=__doc__,89 # jinja is egg safe. But because we distribute the documentation90 # in form of html and txt files it's a better idea to extract the files91 zip_safe=False,92 classifiers=[fixed development status classificationArmin Ronacherbefore adoptiona9d5922
line 93why, one step back93 'Development Status :: 5 - Production/Stable',added unittest for context import/includesArmin Ronacherbefore adoption132757b
lines 94–103why, one step back94 'Environment :: Web Environment',95 'Intended Audience :: Developers',96 'License :: OSI Approved :: BSD License',97 'Operating System :: OS Independent',98 'Programming Language :: Python',99 'Topic :: Internet :: WWW/HTTP :: Dynamic Content',100 'Topic :: Software Development :: Libraries :: Python Modules',101 'Topic :: Text Processing :: Markup :: HTML'102 ],103 packages=['jinja2'],data files are optional nowArmin Ronacherbefore adoption58f351d
line 104why, one step back104 data_files=data_files,added unittest for context import/includesArmin Ronacherbefore adoption132757b
lines 105–115why, one step back105 features={106 'speedups': Feature("optional C speed-enhancements",107 standard=True,108 ext_modules=[109 Extension('jinja2._speedups', ['jinja2/_speedups.c'])110 ]111 )112 },113 extras_require={'i18n': ['Babel>=0.8']},114 entry_points="""115 [babel.extractors]fixed babel entry pointArmin Ronacherbefore adoption7962ce7
line 116why, one step back116 jinja2 = jinja2.ext:babel_extract[i18n]added unittest for context import/includesArmin Ronacherbefore adoption132757b
lines 117–118why, one step back117 """118)