summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Ipsum <richard.ipsum@codethink.co.uk>2014-11-10 17:07:37 +0000
committerRichard Ipsum <richard.ipsum@codethink.co.uk>2014-11-10 17:07:37 +0000
commitbfbda3066e5f7f6b5a0e4d61acf07911814eddc9 (patch)
tree910735ef957b15d990bdff3d7dd63542c460d822
parent02f40a17d9bcd68802292245afb7976b4aac3f6c (diff)
downloadimport-bfbda3066e5f7f6b5a0e4d61acf07911814eddc9.tar.gz
fix conflict symbols emitted by check_lt and check_gt
-rwxr-xr-xexts/pip_find_deps.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/exts/pip_find_deps.py b/exts/pip_find_deps.py
index 1af1ff0..f5f5715 100755
--- a/exts/pip_find_deps.py
+++ b/exts/pip_find_deps.py
@@ -183,24 +183,28 @@ def check_eqs(dep, version):
dep.conflicts.append((dep.greater_than.spec, ('==', version)))
def check_lt(dep, version, inclusive=False):
+ lt_symbol = '<=' if inclusive else '<'
+
if dep.is_unconstrained():
dep.less_than = LowerBound(version, inclusive)
elif dep.is_unbounded():
if dep.absolute >= version:
- dep.conflicts.append((('==', dep.absolute), ('<', version)))
+ dep.conflicts.append((('==', dep.absolute), (lt_symbol, version)))
elif dep.greater_than >= version:
- dep.conflicts.append((dep.greater_than.spec, ('<', version)))
+ dep.conflicts.append((dep.greater_than.spec, (lt_symbol, version)))
else:
dep.less_than = LowerBound(version, inclusive)
def check_gt(dep, version, inclusive=False):
+ gt_symbol = '>=' if inclusive else '>'
+
if dep.is_unconstrained():
dep.greater_than = UpperBound(version, inclusive)
elif dep.is_unbounded():
if dep.absolute <= version:
- dep.conflicts.append((('==', dep.absolute), ('>', version)))
+ dep.conflicts.append((('==', dep.absolute), (gt_symbol, version)))
elif dep.less_than <= version:
- dep.conflicts.append((dep.less_than.spec, ('>', version)))
+ dep.conflicts.append((dep.less_than.spec, (gt_symbol, version)))
else:
dep.greater_than = UpperBound(version, inclusive)