Commits

MattMaker committed 9c681d3

special-case skip removal-as-extras of 'distribute' or 'setuptools' -- if a user wants to remove one of these, they can do so separately using pip uninstall

  • Participants
  • Parent commits 4a967b7

Comments (0)

Files changed (1)

                     paths_to_remove.add(path + '.pyc')
             if dist.has_metadata('requires.txt'):
                 for name in self.requirements(self.extras):
-                    logger.debug("also uninstalling extra requirement %s" % name)
-                    InstallRequirement.from_line(name).uninstall()
+                    # special-case 'distribute' and 'setuptools' -- if a user wants to remove one of these, they can do so separately using pip uninstall
+                    if name != 'distribute' and name != 'setuptools':
+                        logger.debug("also uninstalling extra requirement %s" % name)
+                        InstallRequirement.from_line(name).uninstall()
 
         elif dist.location.endswith(easy_install_egg):
             # package installed by easy_install