a *eg @sddlZddlmZddlmZmZddlmZddlm Z ddl m Z ddl m Z ddlmZed d d Zeed d d ZGddde ZdS)N)Values) AbstractSetList) cmdoptions)Command)SUCCESS)freeze) stdlib_pkgsreturncCs tjdkS)N) )sys version_inforrG/usr/local/lib/python3.9/site-packages/pip/_internal/commands/freeze.py_should_suppress_build_backends srcCsdh}tr|hdO}|S)Npip>wheelZ distribute setuptools)r)pkgsrrr _dev_pkgss rc@s@eZdZdZdZdZdZddddZee e e d d d Z dS) FreezeCommandzx Output installed packages in requirements format. packages are listed in a case-insensitive sorted order. Tz %prog [options])ext://sys.stderrrNr c Cs|jjddddgddd|jjdd d d d d d|jjddd d dd|jt|jjddd ddtd|jjddd dd|jt|j d|jdS)Nz-rz --requirement requirementsappendfilez}Use the order in the given requirements file and its comments when generating output. This option can be used multiple times.)destactiondefaultmetavarhelpz-lz--locallocal store_trueFzUIf in a virtualenv that has global access, do not output globally-installed packages.)rrrr!z--useruserz,Only output packages installed in user-site.z--all freeze_allz,Do not skip these packages in the output: {}z, )rrr!z--exclude-editableexclude_editablez%Exclude editable package from output.r) cmd_opts add_optionr list_pathformatjoinr list_excludeparserinsert_option_group)selfrrr add_options%sR    zFreezeCommand.add_options)optionsargsr c Csrtt}|js|t|jr,||jt|t|j |j |j |j |j ||jdD]}tj|dqXtS)N) requirement local_only user_onlypathsisolatedskipr& )setr r%updaterexcludesrcheck_list_path_optionrrr"r$path isolated_moder&rstdoutwriter)r/r1r2r8linerrrrunYs"    zFreezeCommand.run) __name__ __module__ __qualname____doc__ignore_require_venvusage log_streamsr0rrstrintrCrrrrrs 4r)roptparsertypingrrZpip._internal.clirpip._internal.cli.base_commandrpip._internal.cli.status_codesrZpip._internal.operations.freezerpip._internal.utils.compatr boolrrKrrrrrrs