From 7f107c24645327e5ad52b76a6b1227aa21dae9fa Mon Sep 17 00:00:00 2001 From: Richard Ipsum Date: Thu, 6 Nov 2014 16:06:48 +0000 Subject: Move check_lt out into function --- exts/pip.find_deps | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/exts/pip.find_deps b/exts/pip.find_deps index e7fabd8..c67522f 100755 --- a/exts/pip.find_deps +++ b/exts/pip.find_deps @@ -134,6 +134,17 @@ def check_eqs(dep, version): warn('conflict! == %s conflicts with > %s' % (version, dep.greater_than)) +def check_lt(dep, version): + if dep.is_unconstrained(): + dep.less_than = version + elif dep.greater_than >= version: + # conflict #(our minimum version is greater + # than this greater_than version) + warn('conflict! > %s conflicts with < %s' + % (dep.greater_than, version)) + else: + dep.less_than = version + def find_build_deps(source, name, version=None): debug('source: %s' % source) debug('name: %s' % name) @@ -180,15 +191,7 @@ def find_build_deps(source, name, version=None): dep.excludes.append(version) # TODO: chk_eqs needed here elif op == '<': - if dep.is_unconstrained(): - dep.less_than = version - elif dep.greater_than >= version: - # conflict #(our minimum version is greater - # than this greater_than version) - warn('conflict! > %s conflicts with < %s' - % (dep.greater_than, version)) - else: - dep.less_than = version + check_lt(dep, version) elif op == '>': if dep.is_unconstrained(): dep.greater_than = version -- cgit v1.2.1