diff options
author | Richard Ipsum <richard.ipsum@codethink.co.uk> | 2014-11-11 13:57:26 +0000 |
---|---|---|
committer | Richard Ipsum <richard.ipsum@codethink.co.uk> | 2014-11-11 13:57:26 +0000 |
commit | 8c4de64c11c0f6609bf2f85ba40fa9037c49f6ef (patch) | |
tree | 9107c1d0fe78b86373e261cb40b4f84a8b971937 | |
parent | 6ffe6b22124e8a4fe5265fc21f7eb6be919b4922 (diff) | |
download | import-8c4de64c11c0f6609bf2f85ba40fa9037c49f6ef.tar.gz |
fix absolute comparison for >= conflict detects
-rwxr-xr-x | exts/pip_find_deps.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/exts/pip_find_deps.py b/exts/pip_find_deps.py index bad31ec..7c2d499 100755 --- a/exts/pip_find_deps.py +++ b/exts/pip_find_deps.py @@ -209,14 +209,16 @@ def check_gt(dep, version, inclusive=False): gt_symbol = '>=' if inclusive else '>' gt = UpperBound(version, inclusive) + # TODO: terrible name def abs_cmp(x, y): return x < y if inclusive else x <= y if dep.is_unconstrained(): dep.greater_than = UpperBound(version, inclusive) elif dep.is_unbounded(): - if dep.absolute <= version: # again unless inclusive + #if dep.absolute <= version: # again unless inclusive #if gt >= dep.absolute: + if abs_cmp(dep.absolute, version): dep.conflicts.append((('==', dep.absolute), (gt_symbol, version))) elif dep.less_than <= version: dep.conflicts.append((dep.less_than.spec, (gt_symbol, version))) |