HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //usr/local/lib/python3.7/site-packages/pip/_internal/commands/__pycache__/uninstall.cpython-37.pyc
B

L��g.�@s�ddlZddlmZddlmZddlmZddlmZddl	m
Z
ddlmZm
Z
ddlmZdd	lmZdd
lmZddlmZmZddlmZmZe�e�ZGd
d�de
e�ZdS)�N)�Values)�List)�canonicalize_name)�
cmdoptions)�Command)�SessionCommandMixin�warn_if_run_as_root)�SUCCESS)�InstallationError)�parse_requirements)�install_req_from_line�#install_req_from_parsed_requirement)�check_externally_managed�(protect_pip_from_modification_on_windowsc@s8eZdZdZdZdd�dd�Zeeee	d�dd	�Z
dS)
�UninstallCommandaB
    Uninstall packages.

    pip is able to uninstall most installed packages. Known exceptions are:

    - Pure distutils packages installed with ``python setup.py install``, which
      leave behind no metadata to determine what files were installed.
    - Script wrappers installed by ``python setup.py develop``.
    zU
      %prog [options] <package> ...
      %prog [options] -r <requirements file> ...N)�returnc	Csd|jjddddgddd�|jjdd	d
ddd
�|j�t���|j�t���|j�d|j�dS)Nz-rz
--requirement�requirements�append�filezjUninstall all the packages listed in the given requirements file.  This option can be used multiple times.)�dest�action�default�metavar�helpz-yz--yes�yes�
store_truez2Don't ask for confirmation of uninstall deletions.)rrrr)�cmd_opts�
add_optionr�root_user_action�override_externally_managed�parser�insert_option_group)�self�r#�D/tmp/pip-unpacked-wheel-hv55ucu3/pip/_internal/commands/uninstall.py�add_options(s"zUninstallCommand.add_options)�options�argsrc
Cs|�|�}i}x<|D]4}t||jd�}|jr<||t|j�<qt�d|�qWxH|jD]>}x8t|||d�D]&}t	||jd�}|jrh||t|j�<qhWqTW|s�t
d|j�d|j�d���|js�t�t
d|kd�x2|��D]&}|j|j|jd	kd
�}	|	r�|	��q�W|jdk�rt�tS)N)�isolatedzSInvalid requirement: %r ignored - the uninstall command expects named requirements.)r&�sessionz*You must give at least one requirement to z (see "pip help z")�pip)�
modifying_pipr)�auto_confirm�verbose�warn)�get_default_sessionr�
isolated_mode�namer�logger�warningrrr
r
rrr�values�	uninstallr�	verbosity�commitrrr	)
r"r&r'r)Zreqs_to_uninstallr1�req�filename�
parsed_reqZuninstall_pathsetr#r#r$�run@sD



zUninstallCommand.run)�__name__�
__module__�__qualname__�__doc__�usager%rr�str�intr;r#r#r#r$rs	r)�logging�optparser�typingr�pip._vendor.packaging.utilsrZpip._internal.clir�pip._internal.cli.base_commandr�pip._internal.cli.req_commandrr�pip._internal.cli.status_codesr	�pip._internal.exceptionsr
Zpip._internal.reqr�pip._internal.req.constructorsrr
�pip._internal.utils.miscrr�	getLoggerr<r2rr#r#r#r$�<module>s