From f68c68cfa2bf84c752724526706d093899a0d68f Mon Sep 17 00:00:00 2001 From: Richard Ipsum Date: Fri, 7 Nov 2014 12:01:18 +0000 Subject: fix bug with != check --- exts/pip_find_deps.py | 11 +++++++---- 1 file 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 == '>': -- cgit v1.2.1