o
    Ëý°j˜  ã                   @   sx   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 d dlmZ h d	£ZG d
d„ deƒZdS )é    N)ÚValues)ÚList)Ú
cmdoptions)ÚCommand)ÚSUCCESS)Úfreeze)Ústdlib_pkgs>   úpkg-resourcesÚpipÚwheelÚ
distributeÚ
setuptoolsc                   @   s<   e Zd ZdZdZdZddd„Zded	ee	 de
fd
d„ZdS )ÚFreezeCommandzx
    Output installed packages in requirements format.

    packages are listed in a case-insensitive sorted order.
    z
      %prog [options])úext://sys.stderrr   ÚreturnNc              	   C   s°   | j jddddg ddd� | j jdd	d
dddd� | j jdddddd� | j  t ¡ ¡ | j jdddd d t¡¡d� | j jddddd� | j  t ¡ ¡ | j 	d| j ¡ d S )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ÚjoinÚDEV_PKGSÚlist_excludeÚparserÚinsert_option_group)Úself© r(   ú�/root/aizidognhua/tmp/workspace/projects/ec89d86c-575f-41c9-af57-ac45cbdbf775/venv/lib/python3.10/site-packages/pip/_internal/commands/freeze.pyÚadd_options   sP   øùûú	üzFreezeCommand.add_optionsÚoptionsÚargsc              	   C   sp   t tƒ}|js| t¡ |jr| |j¡ t |¡ t|j	|j
|j|j|j||jd�D ]
}tj |d ¡ q+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   ÚsysÚstdoutÚwriter   )r'   r+   r,   r2   Úliner(   r(   r)   ÚrunM   s"   


ù	zFreezeCommand.run)r   N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚusageÚlog_streamsr*   r   r   ÚstrÚintr>   r(   r(   r(   r)   r      s    
4r   )r:   Úoptparser   Útypingr   Úpip._internal.clir   Úpip._internal.cli.base_commandr   Úpip._internal.cli.status_codesr   Úpip._internal.operations.freezer   Úpip._internal.utils.compatr   r#   r   r(   r(   r(   r)   Ú<module>   s    