a
    b3j                     @   s   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 edd	d
Zee dddZG dd deZdS )    N)Values)
cmdoptions)Command)SUCCESS)freeze)stdlib_pkgsreturnc                   C   s
   t jdk S )N)      )sysversion_info r   r   z/www/wwwroot/dpstar/app/297b3aabda72fedb274352021c2dd8b5_venv/lib/python3.9/site-packages/pip/_internal/commands/freeze.py_should_suppress_build_backends   s    r   c                  C   s   dh} t  r| h dO } | S )Npip>   
setuptoolswheel
distribute)r   )pkgsr   r   r   	_dev_pkgs   s    r   c                   @   s<   e Zd ZdZdZdZddddZeee	 e
dd	d
ZdS )FreezeCommandzx
    Output installed packages in requirements format.

    packages are listed in a case-insensitive sorted order.
    Tz
      %prog [options]Nr   c              	   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joinr   list_excludeparserinsert_option_group)selfr   r   r   add_options#   sR    
	zFreezeCommand.add_options)optionsargsr	   c              	   C   sr   t t}|js|t  |jr,||j t| t|j	|j
|j|j|j||jdD ]}tj|d  qXt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   )r-   r/   r0   r6   liner   r   r   runW   s"    

	zFreezeCommand.run)__name__
__module____qualname____doc__ignore_require_venvusager.   r   liststrintrA   r   r   r   r   r      s
   4r   )r   optparser   pip._internal.clir   pip._internal.cli.base_commandr   pip._internal.cli.status_codesr   Zpip._internal.operations.freezer   pip._internal.utils.compatr   boolr   r8   rI   r   r   r   r   r   r   <module>   s   	