don't uninstall more packages

This commit is contained in:
2017-01-26 17:00:09 -05:00
parent 71aae61494
commit 3f2a563426
2 changed files with 7 additions and 8 deletions
+3 -3
View File
@@ -1,3 +1,6 @@
[dev-packages]
pytest = "*"
[packages]
click = "*"
crayons = "*"
@@ -7,6 +10,3 @@ requests = "*"
requirements-parser = "*"
parse = "*"
"backports.shutil_get_terminal_size" = "*"
[dev-packages]
pytest = "*"
+4 -5
View File
@@ -385,11 +385,10 @@ def do_purge(bare=False, downloads=False, allow_global=False):
installed = freeze.split()
# Remove setuptools and friends from installed, if present.
for package_name in ['setuptools', 'pip', 'wheel', 'six']:
try:
installed.remove(package_name)
except ValueError:
pass
for package_name in ['setuptools', 'pip', 'wheel', 'six', 'packaging', 'pyparsing', 'appdirs']:
for i, package in enumerate(installed):
if package.startswith(package_name):
del installed[i]
if not bare:
click.echo('Found {0} installed package(s), purging...'.format(len(installed)))