diff options
author | Richard Ipsum <richard.ipsum@codethink.co.uk> | 2014-11-04 19:24:37 +0000 |
---|---|---|
committer | Richard Ipsum <richard.ipsum@codethink.co.uk> | 2014-11-04 19:24:37 +0000 |
commit | 5f28712029f39b61d7af3a0f1ee8b49e17917865 (patch) | |
tree | f183f7e566f0779d2eeeb37ebcba4fa61982bf35 | |
parent | 25793d7b188504ff6e4646c7166860f8d3c41a0f (diff) | |
download | import-5f28712029f39b61d7af3a0f1ee8b49e17917865.tar.gz |
more things...
-rwxr-xr-x | exts/pip.find_deps | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/exts/pip.find_deps b/exts/pip.find_deps index db0e71e..f9050a9 100755 --- a/exts/pip.find_deps +++ b/exts/pip.find_deps @@ -23,7 +23,7 @@ import sys import subprocess import os -import requirements +import pkg_resources DEBUG = False @@ -54,7 +54,7 @@ def find_build_deps(source, name, version=None): if p.wait() != 0: error('egg_info command failed') - egg_dir = '%s.egg_info' % name + egg_dir = '%s.egg-info' % name build_deps_file = os.path.join(source, egg_dir, 'setup_requires.txt') # Check whether there's a setup_requires.txt @@ -62,8 +62,8 @@ def find_build_deps(source, name, version=None): print('%s has no build dependencies' % name) else: with open(build_deps_file) as f: - print(list(f.read())) - #json = parse_requirements(...) + for r in pkg_resources.parse_requirements(f): + print('%s%s' % (type(r), r.specs)) if len(sys.argv) not in [3, 4]: print('usage: %s PACKAGE_SOURCE_DIR NAME [VERSION]' % sys.argv[0]) |