From 4acc7ecaafdc1c36602d3ed7c02892c04210de13 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Fri, 24 May 2013 18:41:12 -0400 Subject: [PATCH] - [bug] Changed setup.py to skip installing markupsafe if Python version is < 2.6 or is between 3.0 and less than 3.3, as Markupsafe now only supports 2.6->2.X, 3.3->3.X. [ticket:216] --- CHANGES | 5 +++++ mako/__init__.py | 2 +- setup.py | 19 +++++++++++++------ 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/CHANGES b/CHANGES index e8ffb1f..929660a 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,9 @@ 0.8.1 +- [bug] Changed setup.py to skip installing markupsafe + if Python version is < 2.6 or is between 3.0 and + less than 3.3, as Markupsafe now only supports 2.6->2.X, + 3.3->3.X. [ticket:216] + - [bug] Fixed regression where "entity" filter wasn't converted for py3k properly (added tests.) [ticket:214] diff --git a/mako/__init__.py b/mako/__init__.py index 95be2f2..ab292df 100644 --- a/mako/__init__.py +++ b/mako/__init__.py @@ -5,5 +5,5 @@ # the MIT License: http://www.opensource.org/licenses/mit-license.php -__version__ = '0.8.0' +__version__ = '0.8.1' diff --git a/setup.py b/setup.py index a6b9198..04d4551 100644 --- a/setup.py +++ b/setup.py @@ -9,6 +9,15 @@ readme = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read() +markupsafe_installs = ( + sys.version_info >= (2, 6) and sys.version_info < (3, 0) + ) or sys.version_info >= (3, 3) + +if markupsafe_installs: + install_requires = ['MarkupSafe>=0.9.2'] +else: + install_requires = [] + setup(name='Mako', version=VERSION, description="A super-fast templating language that borrows the \ @@ -31,13 +40,11 @@ license='MIT', packages=find_packages('.', exclude=['examples*', 'test*']), scripts=['scripts/mako-render'], - tests_require = ['nose >= 0.11'], - test_suite = "nose.collector", + tests_require=['nose >= 0.11'], + test_suite="nose.collector", zip_safe=False, - install_requires=[ - 'MarkupSafe>=0.9.2', - ], - extras_require = {'beaker':['Beaker>=1.1']}, + install_requires=install_requires, + extras_require={'beaker': ['Beaker>=1.1']}, entry_points=""" [python.templating.engines] mako = mako.ext.turbogears:TGPlugin