a
    e0h0                     @   s   d dl mZ 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 d d
lmZ d dlmZ h dZerd dlmZ d dlmZ G dd deZdS )    )absolute_importN)
WheelCache)
cmdoptions)Command)SUCCESS)FormatControl)freeze)stdlib_pkgs)
deprecated)MYPY_CHECK_RUNNING>   pipzpkg-resourceswheel
setuptoolsZ
distribute)Values)Listc                   @   s(   e Zd ZdZdZdZdd Z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   c              	   C   s   | j jddddg ddd | 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-fz--find-links
find_linksURLz<URL for finding packages, which will be added to the output.z-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,   K/var/www/auris/lib/python3.9/site-packages/pip/_internal/commands/freeze.pyadd_options!   s^    	zFreezeCommand.add_optionsc                 C   s   t t t }t|j|}tt}|js2|t |jrD||j t	
| |jrdtdd ddd t|j|j|j|j|j|j|||jd	}tf i |D ]}tj|d  qtS )Nz0--find-links option in pip freeze is deprecated.z21.2im#  )replacementgone_inissue)	requirementr   
local_only	user_onlypathsisolatedwheel_cacheskipr!   
)r   setr   	cache_dirr	   r    updater'   excludesr   check_list_path_optionr   r
   dictr   r   r   pathisolated_moder!   r   sysstdoutwriter   )r+   optionsargsformat_controlr7   r8   Zfreeze_kwargsliner,   r,   r-   runQ   s:    

zFreezeCommand.runN)__name__
__module____qualname____doc__usagelog_streamsr.   rI   r,   r,   r,   r-   r      s
   0r   )
__future__r   rB   pip._internal.cacher   Zpip._internal.clir   pip._internal.cli.base_commandr   pip._internal.cli.status_codesr   #pip._internal.models.format_controlr   Zpip._internal.operations.freezer   pip._internal.utils.compatr	   pip._internal.utils.deprecationr
   pip._internal.utils.typingr   r'   optparser   typingr   r   r,   r,   r,   r-   <module>   s   