For example, I am looking for a command line snippe开发者_StackOverflow中文版t to list all dependencies of a python module e.g. http://pypi.python.org/pypi/django-celery given the URL. Does one exist ?
I would use a combination of virtualenv and pip to do the job. The snippet would look sth like this:
virtualenv <path_to_a_new_env> --no-site-packages
<using this virtual env> && pip install <url or package name>
<using this virtual env> && pip freeze
---
<using this virtualenv> - source bin/activate on Linux scipts/activate.bat on linux
The problem is that you this would only list dependencies, but not versions if any specific are required.
Firstly, there is no way get the information through the URL. All packages and all dependencies of dependencies etc must be installed in order to generate the full information.
From the Zope world there is something like
http://pypi.python.org/pypi/z3c.recipe.depgraph/0.5
available.
I can not recall the call of the underlaying module actually used...
Also check
http://furius.ca/snakefood/
http://pypi.python.org/pypi/tl.eggdeps
精彩评论