summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Ipsum <richard.ipsum@codethink.co.uk>2014-11-06 16:06:48 +0000
committerRichard Ipsum <richard.ipsum@codethink.co.uk>2014-11-06 16:06:48 +0000
commit7f107c24645327e5ad52b76a6b1227aa21dae9fa (patch)
treeaf1980de48cfc9368edb77a383b4204a0ef7ec84
parent676c8b8458e21f351861e6ce5d67c280ca98dcbd (diff)
downloadimport-7f107c24645327e5ad52b76a6b1227aa21dae9fa.tar.gz
Move check_lt out into function
-rwxr-xr-xexts/pip.find_deps21
1 files 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