diff options
author | Chris Jerdonek <chris.jerdonek@gmail.com> | 2012-04-07 10:59:36 -0700 |
---|---|---|
committer | Chris Jerdonek <chris.jerdonek@gmail.com> | 2012-04-07 10:59:36 -0700 |
commit | c5326ce49980b513c6ad7003994e56fa6ed98257 (patch) | |
tree | d00e1edf320d74c0e22ea6bfe78c727729c7852f /setup.py | |
parent | 235157084c9a6edf06f3d6be05dac129a502799b (diff) | |
download | pystache-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.py | 20 |
1 files changed, 18 insertions, 2 deletions
@@ -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 ) |