Skip to content

Commit 73cc574

Browse files
committed
BLD : improve how six dependency is handled
if an old version of six is installed try to update it rather than fail.c
1 parent 04617e9 commit 73cc574

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

setupext.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1170,12 +1170,17 @@ def check(self):
11701170
import six
11711171
except ImportError:
11721172
return (
1173-
"six was not found.")
1173+
"six was not found."
1174+
"pip will attempt to install it "
1175+
"after matplotlib.")
11741176

11751177
if not is_min_version(six.__version__, self.min_version):
1176-
raise CheckFailed(
1177-
"Requires six %s or later. Found %s." %
1178-
(self.min_version, six.__version__))
1178+
return ("The installed version of six is {inst_ver} but "
1179+
"a the minimum required version is {min_ver}. "
1180+
"pip/easy install will attempt to install a "
1181+
"newer version."
1182+
).format(min_ver=self.min_version,
1183+
inst_ver=six.__version__)
11791184

11801185
return "using six version %s" % six.__version__
11811186

0 commit comments

Comments
 (0)