Jannis Leidel avatar Jannis Leidel committed 6243273

Reverted accidentally merged code from r03b0b2620045

Comments (0)

Files changed (1)

 
 InstallCommand()
 
-class UninstallCommand(Command):
-    name = 'uninstall'
-    usage = '%prog [OPTIONS] PACKAGE_NAMES...'
-    summary = 'Uninstall packages'
-    bundle = False
-
-    def __init__(self):
-        super(UninstallCommand, self).__init__()
-        self.parser.add_option(
-            '-r', '--requirement',
-            dest='requirements',
-            action='append',
-            default=[],
-            metavar='FILENAME',
-            help='Uninstall all the packages listed in the given requirements file.  '
-            'This option can be used multiple times.')
-        self.parser.add_option(
-            '-f', '--find-links',
-            dest='find_links',
-            action='append',
-            default=[],
-            metavar='URL',
-            help='URL to look for packages at')
-        self.parser.add_option(
-            '-i', '--index-url',
-            dest='index_url',
-            metavar='URL',
-            default=pypi_url,
-            help='base URL of Python Package Index')
-        self.parser.add_option(
-            '--extra-index-url',
-            dest='extra_index_urls',
-            metavar='URL',
-            action='append',
-            default=[],
-            help='extra URLs of package indexes to use in addition to --index-url')
-
-        self.parser.add_option(
-            '-b', '--build', '--build-dir', '--build-directory',
-            dest='build_dir',
-            metavar='DIR',
-            default=None,
-            help='Unpack packages into DIR (default %s) and build from there' % base_prefix)
-        self.parser.add_option(
-            '--src', '--source',
-            dest='src_dir',
-            metavar='DIR',
-            default=None,
-            help='Check out --editable packages into DIR (default %s)' % base_src_prefix)
-
-        self.parser.add_option(
-            '--no-uninstall',
-            dest='no_uninstall',
-            action='store_true',
-            help="List the packages, but don't actually uninstall them")
-
-    def run(self, options, args):
-        if not options.build_dir:
-            options.build_dir = base_prefix
-        if not options.src_dir:
-            options.src_dir = base_src_prefix
-        options.build_dir = os.path.abspath(options.build_dir)
-        options.src_dir = os.path.abspath(options.src_dir)
-        index_urls = [options.index_url] + options.extra_index_urls
-        finder = PackageFinder(
-            find_links=options.find_links,
-            index_urls=index_urls)
-        requirement_set = RequirementSet(
-            build_dir=options.build_dir,
-            src_dir=options.src_dir)
-        for name in args:
-            requirement_set.add_requirement(
-                InstallRequirement.from_line(name, None))
-        for name in options.editables:
-            requirement_set.add_requirement(
-                InstallRequirement.from_editable(name))
-        for filename in options.requirements:
-            for req in parse_requirements(filename, finder=finder):
-                requirement_set.add_requirement(req)
-        requirement_set.uninstall_files(finder, force_root_egg_info=self.bundle)
-        if not options.no_uninstall and not self.bundle:
-            requirement_set.uninstall()
-            logger.notify('Successfully uninstalled %s' % requirement_set)
-        elif not self.bundle:
-            logger.notify('Would uninstall %s' % requirement_set)
-        return requirement_set
-
-UninstallCommand()
 
 class BundleCommand(InstallCommand):
     name = 'bundle'
             finally:
                 logger.indent -= 2
 
-    def uninstall_files(self, finder, force_root_egg_info=False):
-        pass
-
     def unpack_url(self, link, location):
         for backend in vcs.backends:
             if link.scheme in backend.schemes:
         finally:
             logger.indent -= 2
 
-    def uninstall(self, uninstall_options):
-        pass
-
     def create_bundle(self, bundle_filename):
         ## FIXME: can't decide which is better; zip is easier to read
         ## random files from, but tar.bz2 is smaller and not as lame a
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.