
    k"g                         d dl 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 d dlmZ d	efd
Zd	ee   fdZ G d de	      Zy)    N)Values)AbstractSetList)
cmdoptions)Command)SUCCESS)freeze)stdlib_pkgsreturnc                  (    t         j                  dk  S )N)      )sysversion_info     V/var/www/html/djangosite/lib/python3.12/site-packages/pip/_internal/commands/freeze.py_should_suppress_build_backendsr      s    g%%r   c                  <    dh} t               r| h dz  } | h dz  } | S )Npip>   wheel
distribute
setuptools>   pkg-resourcesr   r   r   )r   )pkgss    r   	_dev_pkgsr      s*    7D&(55FFKr   c                   :    e Zd ZdZdZdZd
dZdedee	   de
fd	Zy)FreezeCommandzx
    Output installed packages in requirements format.

    packages are listed in a case-insensitive sorted order.
    z
      %prog [options])ext://sys.stderrr   r   Nc                    | j                   j                  ddddg dd       | j                   j                  dd	d
ddd       | j                   j                  ddddd       | j                   j                  t        j                                | j                   j                  ddddj	                  dj                  t                                  | j                   j                  dddd       | j                   j                  t        j                                | j                  j                  d| j                          y )Nz-rz--requirementrequirementsappendfilez}Use the order in the given requirements file and its comments when generating output. This option can be used multiple times.)destactiondefaultmetavarhelpz-lz--locallocal
store_trueFzUIf in a virtualenv that has global access, do not output globally-installed packages.)r$   r%   r&   r(   z--useruserz,Only output packages installed in user-site.z--all
freeze_allz,Do not skip these packages in the output: {}z, )r$   r%   r(   z--exclude-editableexclude_editablez%Exclude editable package from output.r   )
cmd_opts
add_optionr   	list_pathformatjoinr   list_excludeparserinsert_option_group)selfs    r   add_optionszFreezeCommand.add_options%   s6     ' 	! 	
 	  / 	! 
	
 	  ? 	! 	
 	  !5!5!78  fTYYy{34 	! 	
 	   #8	 	! 	
 	  !8!8!:;''4==9r   optionsargsc           	         t        t              }|j                  s|j                  t	                      |j
                  r|j                  |j
                         t        j                  |       t        |j                  |j                  |j                  |j                  |j                  ||j                        D ]$  }t        j                   j#                  |dz          & t$        S )N)requirement
local_only	user_onlypathsisolatedskipr-   
)setr
   r,   updater   excludesr   check_list_path_optionr	   r!   r)   r+   pathisolated_moder-   r   stdoutwriter   )r6   r8   r9   r@   lines        r   runzFreezeCommand.runY   s    ;!!KK	$KK(()))'2,,}}ll,,**$55
 		*D JJTD[)		* r   )r   N)__name__
__module____qualname____doc__usagelog_streamsr7   r   r   strintrK   r   r   r   r   r      s7    E:K2:h6 c s r   r   )r   optparser   typingr   r   pip._internal.clir   pip._internal.cli.base_commandr   pip._internal.cli.status_codesr   pip._internal.operations.freezer	   pip._internal.utils.compatr
   boolr   rR   r   r   r   r   r   <module>r\      sH    
  $ ( 2 2 2 2& &;s# SG Sr   