def check_requirement(req, vers_and_locs):
- # We support only conjunctions of <=, >=, and !=
+ # We support only conjunctions of <=, >=, ==, and !=
reqlist = req.split(',')
- name = reqlist[0].split('<=')[0].split('>=')[0].split('!=')[0].strip(' ').split('[')[0]
+ name = reqlist[0].split('<=')[0].split('>=')[0].split('==')[0].split('!=')[0].strip(' ').split('[')[0]
if name not in vers_and_locs:
raise PackagingError("no version info for %s" % (name,))
if req.strip(' ') == name:
if not (actualver >= normalized_version(required, what="required minimum version %r in %r" % (required, req))):
return False # minimum requirement not met
else:
- s = r.split('!=')
+ s = r.split('==')
if len(s) == 2:
required = s[1].strip(' ')
- if not (actualver != normalized_version(required, what="excluded version %r in %r" % (required, req))):
- return False # not-equal requirement not met
+ if not (actualver == normalized_version(required, what="required exact version %r in %r" % (required, req))):
+ return False # exact requirement not met
else:
- raise PackagingError("no version info or could not understand requirement %r" % (req,))
+ s = r.split('!=')
+ if len(s) == 2:
+ required = s[1].strip(' ')
+ if not (actualver != normalized_version(required, what="excluded version %r in %r" % (required, req))):
+ return False # not-equal requirement not met
+ else:
+ raise PackagingError("no version info or could not understand requirement %r" % (req,))
return True
# * >= X, != Y, != Z, ... where X < Y < Z...
#
# (In addition, check_requirement in allmydata/__init__.py only supports
-# >=, <= and != operators.)
+# >=, <=, ==, and != operators.)
install_requires = [
# We require newer versions of setuptools (actually