summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xexts/pip_find_deps.py21
1 files changed, 11 insertions, 10 deletions
diff --git a/exts/pip_find_deps.py b/exts/pip_find_deps.py
index 3666afe..88391f9 100755
--- a/exts/pip_find_deps.py
+++ b/exts/pip_find_deps.py
@@ -230,16 +230,17 @@ def find_build_deps(source, name, version=None):
return build_deps
-if len(sys.argv) not in [3, 4]:
- print('usage: %s PACKAGE_SOURCE_DIR NAME [VERSION]' % sys.argv[0])
- sys.exit(1)
+if __name__ == '__main__':
+ if len(sys.argv) not in [3, 4]:
+ print('usage: %s PACKAGE_SOURCE_DIR NAME [VERSION]' % sys.argv[0])
+ sys.exit(1)
-# Ignore the issue of dependency conflicts for now
+ # Ignore the issue of dependency conflicts for now
-# First, given a source return build dependencies in json from
+ # First, given a source return build dependencies in json from
-for name, dep in find_build_deps(*sys.argv[1:]).iteritems():
- print('%s less_than: %s greater_than: %s absolute: %s excludes: %s'
- % (name, str(dep.less_than), str(dep.greater_than),
- str(dep.absolute), dep.excludes))
- print('conflicts: %s' % str(dep.conflicts)) \ No newline at end of file
+ for name, dep in find_build_deps(*sys.argv[1:]).iteritems():
+ print('%s less_than: %s greater_than: %s absolute: %s excludes: %s'
+ % (name, str(dep.less_than), str(dep.greater_than),
+ str(dep.absolute), dep.excludes))
+ print('conflicts: %s' % str(dep.conflicts))