From 4f54d85e8f4400b02d7e203ed64ce239b4ce504a Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Wed, 14 Dec 2011 22:49:48 -0500 Subject: modernize the README --- README | 25 ------------------------- README.py3k | 56 -------------------------------------------------------- README.rst | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ setup.py | 14 +++----------- 4 files changed, 55 insertions(+), 92 deletions(-) delete mode 100644 README delete mode 100644 README.py3k create mode 100644 README.rst diff --git a/README b/README deleted file mode 100644 index 1930412..0000000 --- a/README +++ /dev/null @@ -1,25 +0,0 @@ -Mako is licensed under an MIT-style license (see LICENSE). -Other incorporated projects may be licensed under different licenses. -All licenses allow for non-commercial and commercial use. - -To install: - - python setup.py install - -SVN checkouts also inlcude setup.cfg file allowing setuptools to create -an svn-tagged build. - -Documentation is available in HTML format in the ./doc/ directory. - -Unit tests run via nose, and are available via setup.py: - - python setup.py test - -Or direct nose usage: - - nosetests -v - -For Python 3 information, see README.py3k. - -good luck ! - diff --git a/README.py3k b/README.py3k deleted file mode 100644 index 73e0190..0000000 --- a/README.py3k +++ /dev/null @@ -1,56 +0,0 @@ -================= -PYTHON 3 SUPPORT -================= - -Python 3 support in Mako is provided by the Python 2to3 script. - -Installing Distribute ---------------------- - -Distribute should be installed with the Python3 installation. The -distribute bootloader is included. - -Running as a user with permission to modify the Python distribution, -install Distribute: - - python3 distribute_setup.py - -Installing Mako in Python 3 ---------------------------------- - -Once Distribute is installed, Mako can be installed directly. -The 2to3 process will kick in which takes several minutes: - - python3 setup.py install - -Converting Tests, Examples, Source to Python 3 ----------------------------------------------- - -To convert all files in the source distribution, run -the 2to3 script: - - 2to3 -w mako test - -If using 3.1's 2to3 tool, the --no-diffs flag might help -with unicode issues: - - 2to3-3.1 -w --no-diffs mako test - -The above will rewrite all files in-place in Python 3 format. - -Running Tests -------------- - -To run the unit tests, ensure Distribute is installed as above, -and also that at least the ./mako/ and ./test/ directories have been converted -to Python 3 using the source tool above. A Python 3 version of Nose -can be acquired from Bitbucket using Mercurial: - - hg clone http://bitbucket.org/jpellerin/nose3/ - cd nose3 - python3 setup.py install - -The tests can then be run using the "nosetests3" script installed -by the above (python3 setup.py test doesn't seem to be working with -nose3). - diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..8da9d69 --- /dev/null +++ b/README.rst @@ -0,0 +1,52 @@ +========================= +Mako Templates for Python +========================= + +Mako is a template library written in Python. It provides a familiar, non-XML +syntax which compiles into Python modules for maximum performance. Mako's +syntax and API borrows from the best ideas of many others, including Django +templates, Cheetah, Myghty, and Genshi. Conceptually, Mako is an embedded +Python (i.e. Python Server Page) language, which refines the familiar ideas +of componentized layout and inheritance to produce one of the most +straightforward and flexible models available, while also maintaining close +ties to Python calling and scoping semantics. + +Nutshell +======== + +:: + + <%inherit file="base.html"/> + <% + rows = [[v for v in range(0,10)] for row in range(0,10)] + %> + + % for row in rows: + ${makerow(row)} + % endfor +
+ + <%def name="makerow(row)"> + + % for name in row: + ${name}\ + % endfor + + + +Philosophy +=========== + +Python is a great scripting language. Don't reinvent the wheel...your templates can handle it ! + +Documentation +============== + +See documentation for Mako at http://www.makotemplates.org/docs/ + +License +======== + +Mako is licensed under an MIT-style license (see LICENSE). +Other incorporated projects may be licensed under different licenses. +All licenses allow for non-commercial and commercial use. diff --git a/setup.py b/setup.py index d3653ca..6438750 100644 --- a/setup.py +++ b/setup.py @@ -13,21 +13,13 @@ v = open(os.path.join(os.path.dirname(__file__), 'mako', '__init__.py')) VERSION = re.compile(r".*__version__ = '(.*?)'", re.S).match(v.read()).group(1) v.close() +readme = os.path.join(os.path.dirname(__file__), 'README.rst') + setup(name='Mako', version=VERSION, description="A super-fast templating language that borrows the \ best ideas from the existing templating languages.", - long_description="""\ -Mako is a template library written in Python. It provides a familiar, non-XML -syntax which compiles into Python modules for maximum performance. Mako's -syntax and API borrows from the best ideas of many others, including Django -templates, Cheetah, Myghty, and Genshi. Conceptually, Mako is an embedded -Python (i.e. Python Server Page) language, which refines the familiar ideas -of componentized layout and inheritance to produce one of the most -straightforward and flexible models available, while also maintaining close -ties to Python calling and scoping semantics. - -""", + long_description=readme, classifiers=[ 'Development Status :: 5 - Production/Stable', 'Environment :: Web Environment', -- cgit v1.2.1