From ccd9529c32212b37b260729f11e3f65796576cfc Mon Sep 17 00:00:00 2001 From: Vineet Date: Wed, 5 Feb 2014 21:42:43 +0530 Subject: [PATCH] Skip 'pipdeptree' itself when displaying the tree --- pipdeptree.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pipdeptree.py b/pipdeptree.py index 1d85e33..eb981ea 100644 --- a/pipdeptree.py +++ b/pipdeptree.py @@ -90,8 +90,10 @@ def main(): 'current virtualenv, if in a virtualenv' )) args = parser.parse_args() - print(render_tree(pip.get_installed_distributions(local_only=args.local_only), - list_all=args.all)) + default_skip = ['setuptools', 'pip', 'python', 'distribute'] + packages = pip.get_installed_distributions(local_only=args.local_only, + skip=default_skip+['pipdeptree']) + print(render_tree(packages, list_all=args.all)) return 0