summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2011-12-14 22:49:48 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2011-12-14 22:49:48 -0500
commit4f54d85e8f4400b02d7e203ed64ce239b4ce504a (patch)
tree960e5a40f00a3b458f207421aeca2f8bf158586b
parent04567a8cc9e9855319716d5b06bb1d05c5a5ec3e (diff)
downloadmako-4f54d85e8f4400b02d7e203ed64ce239b4ce504a.tar.gz
modernize the README
-rw-r--r--README25
-rw-r--r--README.py3k56
-rw-r--r--README.rst52
-rw-r--r--setup.py14
4 files changed, 55 insertions, 92 deletions
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)]
+ %>
+ <table>
+ % for row in rows:
+ ${makerow(row)}
+ % endfor
+ </table>
+
+ <%def name="makerow(row)">
+ <tr>
+ % for name in row:
+ <td>${name}</td>\
+ % endfor
+ </tr>
+ </%def>
+
+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',