From 6b92bc7fd4d72da70490ca5ac241babd97f77afb Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 27 Mar 2011 13:50:12 -0400 Subject: [PATCH] Fix for incorrect dateutil version under python 2 --- setup.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index f1063f2..67200d6 100644 --- a/setup.py +++ b/setup.py @@ -3,6 +3,7 @@ # $Id$ import os +import sys from setuptools import find_packages from distutils.cmd import Command @@ -15,6 +16,11 @@ class DisabledTestCommand(Command): _this_dir = os.path.dirname(__file__) _long_description = open('readme.txt').read().strip() +# it seems that dateutil 2.0 only works under Python 3 +dateutil_req = ( + ['python-dateutil>=1.4,<2.0dev'] if sys.version < (3,0) + else ['python-dateutil>=2.0'] ) + setup_params = dict( name = "svg.charts", version = "2.0.6", @@ -28,10 +34,9 @@ setup_params = dict( namespace_packages=['svg'], include_package_data = True, install_requires=[ - 'python-dateutil>=1.4', 'cssutils>=0.9.6b3', 'lxml>=2.0', - ], + ] + dateutil_req, license = "MIT", classifiers = [ "Development Status :: 5 - Production/Stable",