From e33d16283f64e17e8765e35cf845f2e465b7e692 Mon Sep 17 00:00:00 2001 From: Richard Ipsum Date: Thu, 6 Nov 2014 16:07:54 +0000 Subject: Move check_gt out into function --- exts/pip.find_deps | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/exts/pip.find_deps b/exts/pip.find_deps index c67522f..446b1a2 100755 --- a/exts/pip.find_deps +++ b/exts/pip.find_deps @@ -145,6 +145,15 @@ def check_lt(dep, version): else: dep.less_than = version +def check_gt(dep, version): + if dep.is_unconstrained(): + dep.greater_than = version + elif dep.less_than <= version: + # conflict (our maximum version is less than this + # less_than version) + warn('conflict! < %s conflicts with > %s' + % (dep.less_than, version)) + def find_build_deps(source, name, version=None): debug('source: %s' % source) debug('name: %s' % name) @@ -193,13 +202,7 @@ def find_build_deps(source, name, version=None): elif op == '<': check_lt(dep, version) elif op == '>': - if dep.is_unconstrained(): - dep.greater_than = version - elif dep.less_than <= version: - # conflict (our maximum version is less than this - # less_than version) - warn('conflict! < %s conflicts with > %s' - % (dep.less_than, version)) + check_gt(dep, version) # Resolve versions #client = xmlrpclib.ServerProxy(PYPI_URL) -- cgit v1.2.1