summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY.rst1
-rw-r--r--README.rst46
-rw-r--r--setup.py1
3 files changed, 22 insertions, 26 deletions
diff --git a/HISTORY.rst b/HISTORY.rst
index 073825c..c453628 100644
--- a/HISTORY.rst
+++ b/HISTORY.rst
@@ -6,6 +6,7 @@ History
* Added support for Python 3.2 (following conversion with 2to3_).
* Test runner now supports both yaml and json forms of Mustache spec.
+* Added tox support to test multiple Python versions.
0.5.0 (2012-04-03)
------------------
diff --git a/README.rst b/README.rst
index 6b2ecd6..c2eea32 100644
--- a/README.rst
+++ b/README.rst
@@ -134,50 +134,42 @@ default to values set in Pystache's ``defaults`` module.
Test It
=======
-Pystache can be tested using both Python 2 and 3 -- even from a single
-Python 2 install if using Distribute's ``test`` (see below).
+Use tox_ to test Pystache with multiple versions of Python all at once! ::
+
+ pip install tox
+ tox -e py26,py27 # for example
+ # Or, if you have all versions of Pythons in tox.ini, simply
+ tox
To include tests from the Mustache spec in your test runs: ::
git submodule init
git submodule update
+You can also test Pystache without tox (but with only a single version of
+Python at a time), as below. First, install Distribute_ ::
-Python 3
---------
-
-For Python 3, we recommend installing and using Distribute_.
-Then one can invoke `Distribute's test`_ command: ::
-
- python setup.py test
+ pip install distribute
-Python 2
---------
+Python 2.7 and Later
+--------------------
-For Python 2, we recommend nose_: ::
+Then run `Distribute's test`_: ::
- pip install nose
- cd pystache
- nosetests
-
-Depending on your Python version and nose installation, you may need
-to type, for example-- ::
+ python setup.py test
- nosetests-2.4
+When using Python 3, this runs 2to3_ on the source code automatically.
-To run all available tests (including doctests)-- ::
- nosetests --with-doctest --doctest-extension=rst
+Python 2.6 and Earlier
+----------------------
-or alternatively (using setup.cfg)-- ::
+For Python 2.6 and earlier, use nose_ instead of ``test``: ::
+ pip install nose
python setup.py nosetests
-To run a subset of the tests, you can use this pattern, for example-- ::
-
- nosetests --tests tests/test_context.py:GetValueTests.test_dictionary__key_present
-
Mailing List
============
@@ -200,6 +192,7 @@ Author
Chris Wanstrath :: chris@ozmm.org
+.. _2to3: http://docs.python.org/library/2to3.html
.. _ctemplate: http://code.google.com/p/google-ctemplate/
.. _David Phillips: http://davidphillips.us/
.. _Distribute: http://pypi.python.org/pypi/distribute
@@ -216,4 +209,5 @@ Author
.. _semantically versioned: http://semver.org
.. _simplejson: http://pypi.python.org/pypi/simplejson/
.. _built-in unicode function: http://docs.python.org/library/functions.html#unicode
+.. _tox: http://pypi.python.org/pypi/tox
.. _version 1.0.3: https://github.com/mustache/spec/tree/48c933b0bb780875acbfd15816297e263c53d6f7
diff --git a/setup.py b/setup.py
index dc4dc69..365b3cc 100644
--- a/setup.py
+++ b/setup.py
@@ -43,6 +43,7 @@ py_version = sys.version_info
# Distribute works with Python 2.3.5 and above:
# http://packages.python.org/distribute/setuptools.html#building-and-distributing-packages-with-distribute
if py_version < (2, 3, 5):
+ # TODO: this might not work yet.
import distutils as dist
from distutils import core
setup = core.setup