summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Ipsum <richard.ipsum@codethink.co.uk>2014-11-07 12:01:18 +0000
committerRichard Ipsum <richard.ipsum@codethink.co.uk>2014-11-07 12:01:18 +0000
commitf68c68cfa2bf84c752724526706d093899a0d68f (patch)
tree4a146828f4d22683088a8d912c973676dd6a04cd
parent5f4d36b5b25602586181a0ad25c0fa825cc409b3 (diff)
downloadimport-f68c68cfa2bf84c752724526706d093899a0d68f.tar.gz
fix bug with != check
-rwxr-xr-xexts/pip_find_deps.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/exts/pip_find_deps.py b/exts/pip_find_deps.py
index a59347b..591f614 100755
--- a/exts/pip_find_deps.py
+++ b/exts/pip_find_deps.py
@@ -130,9 +130,9 @@ def check_eqs(dep, version):
% (version, dep.absolute))
dep.conflicts.append((('==', dep.absolute), ('==', version)))
elif version in dep.excludes:
- warn('conflict! == %s conflicts with != %s'
+ warn('conflict! != %s conflicts with == %s'
% (version, version))
- dep.conflicts.append((('==', version), ('!=', version)))
+ dep.conflicts.append((('!=', version), ('==', version)))
elif version > dep.less_than:
# conflict
warn('42 conflict! < %s conflicts with == %s'
@@ -194,8 +194,11 @@ def resolve_version_constraints(requirements):
if op == '==':
check_eqs(dep, version)
elif op == '!=':
- dep.excludes.append(version)
- check_eqs(dep, version)
+ if dep.absolute != version:
+ dep.excludes.append(version)
+ else:
+ dep.conflicts.append((('==', dep.absolute),
+ ('!=', version)))
elif op == '<':
check_lt(dep, version)
elif op == '>':