diff options
author | Richard Ipsum <richard.ipsum@codethink.co.uk> | 2014-11-06 17:26:23 +0000 |
---|---|---|
committer | Richard Ipsum <richard.ipsum@codethink.co.uk> | 2014-11-06 17:26:23 +0000 |
commit | 4615aefe242f5dbb49f3f2aff2844c5c98da91ea (patch) | |
tree | bcc1fd1074b7b5d80fb857117f8fd8f8bc7b2a02 /exts | |
parent | d36d930802ddf5f7e6cd4ef39d40d3872d53afcd (diff) | |
download | import-4615aefe242f5dbb49f3f2aff2844c5c98da91ea.tar.gz |
guard on main
Diffstat (limited to 'exts')
-rwxr-xr-x | exts/pip_find_deps.py | 21 |
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)) |