Thanks to visit codestin.com
Credit goes to github.com

Skip to content

don't install python-dateutil==2.1 on python 3.3 #2381

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 4, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion setupext.py
Original file line number Diff line number Diff line change
Expand Up @@ -913,10 +913,21 @@ def get_extension(self):
class Dateutil(SetupPackage):
name = "dateutil"

def __init__(self, version=None):
self.version = version

def check(self):
try:
import dateutil
except ImportError:
# dateutil 2.1 has a file encoding bug that breaks installation on
# python 3.3
# https://github.com/matplotlib/matplotlib/issues/2373
# hack around the problem by installing the the (working) v2.0
major, minor1, _, _, _ = sys.version_info
if self.version is None and (major, minor1) == (3, 3):
self.version = '!=2.1'

return (
"dateutil was not found. It is required for date axis "
"support. pip/easy_install may attempt to install it "
Expand All @@ -925,7 +936,10 @@ def check(self):
return "using dateutil version %s" % dateutil.__version__

def get_install_requires(self):
return ['python-dateutil']
dateutil = 'python-dateutil'
if self.version is not None:
dateutil += self.version
return [dateutil]


class Tornado(SetupPackage):
Expand Down