File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -126,6 +126,11 @@ def compare_versions(a, b):
126
126
else :
127
127
return False
128
128
129
+ if not compare_versions (six .__version__ , '1.5' ):
130
+ raise ImportError (
131
+ 'six 1.5 or later is required; you have %s' % (
132
+ six .__version__ ))
133
+
129
134
try :
130
135
import pyparsing
131
136
except ImportError :
Original file line number Diff line number Diff line change @@ -1090,6 +1090,7 @@ def get_extension(self):
1090
1090
1091
1091
class Six (SetupPackage ):
1092
1092
name = "six"
1093
+ min_version = "1.5"
1093
1094
1094
1095
def check (self ):
1095
1096
try :
@@ -1098,10 +1099,15 @@ def check(self):
1098
1099
return (
1099
1100
"six was not found." )
1100
1101
1102
+ if not is_min_version (six .__version__ , self .min_version ):
1103
+ raise CheckFailed (
1104
+ "Requires six %s or later. Found %s." %
1105
+ (self .min_version , version ))
1106
+
1101
1107
return "using six version %s" % six .__version__
1102
1108
1103
1109
def get_install_requires (self ):
1104
- return ['six' ]
1110
+ return ['six>={0}' . format ( self . min_version ) ]
1105
1111
1106
1112
1107
1113
class Dateutil (SetupPackage ):
You can’t perform that action at this time.
0 commit comments