summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorChris Jerdonek <chris.jerdonek@gmail.com>2012-04-07 10:59:36 -0700
committerChris Jerdonek <chris.jerdonek@gmail.com>2012-04-07 10:59:36 -0700
commitc5326ce49980b513c6ad7003994e56fa6ed98257 (patch)
treed00e1edf320d74c0e22ea6bfe78c727729c7852f /setup.py
parent235157084c9a6edf06f3d6be05dac129a502799b (diff)
downloadpystache-c5326ce49980b513c6ad7003994e56fa6ed98257.tar.gz
Eliminate a unit test warning while running tests with earlier versions of Python.
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py20
1 files changed, 18 insertions, 2 deletions
diff --git a/setup.py b/setup.py
index 91434d2..056c321 100644
--- a/setup.py
+++ b/setup.py
@@ -70,6 +70,22 @@ if sys.argv[-1] == 'publish':
long_description = make_long_description()
template_files = ['*.mustache', '*.txt']
+# We follow the suggestion here for compatibility with earlier versions
+# of Python:
+#
+# http://packages.python.org/distribute/python3.html#note-on-compatibility-with-setuptools
+#
+if sys.version_info < (2, 7):
+ extra = {}
+else:
+ # For testing purposes, we also use use_2to3 with Python 2.7. This
+ # lets us troubleshoot the absence of package resources in the build
+ # directory more easily (e.g. the absence of README.rst), since we can
+ # troubleshoot it while using Python 2.7 instead of Python 3.
+ extra = {
+ 'use_2to3': True,
+ }
+
setup(name='pystache',
version='0.5.0-rc',
license='MIT',
@@ -87,7 +103,6 @@ setup(name='pystache',
'pystache.tests.data.locator': template_files,
},
test_suite='pystache.tests',
- use_2to3=True,
entry_points = {
'console_scripts': ['pystache=pystache.commands:main'],
},
@@ -99,5 +114,6 @@ setup(name='pystache',
'Programming Language :: Python :: 2.5',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
- )
+ ),
+ **extra
)