summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Ipsum <richard.ipsum@codethink.co.uk>2014-11-06 16:07:54 +0000
committerRichard Ipsum <richard.ipsum@codethink.co.uk>2014-11-06 16:08:52 +0000
commite33d16283f64e17e8765e35cf845f2e465b7e692 (patch)
tree43956e3883d09ed81f50ae8ecd3612afced44cb4
parent7f107c24645327e5ad52b76a6b1227aa21dae9fa (diff)
downloadimport-e33d16283f64e17e8765e35cf845f2e465b7e692.tar.gz
Move check_gt out into function
-rwxr-xr-xexts/pip.find_deps17
1 files 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)