
    *,h.                         d dl Z d dlmZ d dlmZ d dlmZ d dlmZ d dl	m
Z
 d dlmZmZ d dlmZ d d	lmZ d d
lmZ d dlmZmZ d dlmZmZ  e j4                  e      Z G d de
e      Zy)    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                   6    e Zd ZdZdZd	dZdedee   de	fdZ
y)
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> ...returnNc           	         | j                   j                  ddddg dd       | j                   j                  dd	d
dd       | j                   j                  t        j                                | j                   j                  t        j                                | j
                  j                  d| j                          y )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.)r   r   r   r   )cmd_opts
add_optionr   root_user_actionoverride_externally_managedparserinsert_option_group)selfs    b/var/www/html/Resume-Scraper/venv/lib/python3.12/site-packages/pip/_internal/commands/uninstall.pyadd_optionszUninstallCommand.add_options(   s      A 	! 	
 	  E 	! 	
 	  !<!<!>?  !G!G!IJ''4==9    optionsargsc                    | j                  |      }i }|D ]T  }t        ||j                        }|j                  r||t	        |j                        <   ?t
        j                  d|       V |j                  D ]Q  }t        |||      D ]>  }t        ||j                        }|j                  s'||t	        |j                        <   @ S |s&t        d| j                   d| j                   d      |j                  s
t                t        d|v        |j                         D ]?  }|j                  |j                   | j"                  d	kD  
      }	|	s0|	j%                          A |j&                  dk(  r
t)                t*        S )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warningr   r   r   r   r"   r   r   values	uninstallr   	verbositycommitr!   r	   r
   )
r%   r)   r*   r-   reqs_to_uninstallr5   reqfilename
parsed_requninstall_pathsets
             r&   runzUninstallCommand.run@   s   **73 	D' ..C xxAD!"3CHH"=>% 		  ,, 	IH0'7 I
 :)>)> 88EH%&7&ABI	I !#<TYYK H!YYKr+ 
 22$&0#44	
 %++- 	+C #$[[* !. ! !!((*	+ ##v-!r(   )r   N)__name__
__module____qualname____doc__usager'   r   r   strintrA    r(   r&   r   r      s1    4E:016 1c 1s 1r(   r   )loggingoptparser   typingr   pip._vendor.packaging.utilsr   pip._internal.clir   pip._internal.cli.base_commandr   pip._internal.cli.req_commandr   r	   pip._internal.cli.status_codesr
   pip._internal.exceptionsr   pip._internal.reqr   pip._internal.req.constructorsr   r   pip._internal.utils.miscr   r   	getLoggerrB   r6   r   rI   r(   r&   <module>rW      sR       9 ( 2 R 2 6 0
 
		8	$Xw 3 Xr(   