o Ec @sxddlZddlmZddlmZddlmZddlmZddl m Z ddl m Z ddl mZhd ZGd d d eZdS) N)Values)List) cmdoptions)Command)SUCCESS)freeze) stdlib_pkgs>Z setuptoolsZwheelZpipZ distributec@s<eZdZdZdZdZd ddZded ee de fd d Z dS) FreezeCommandzx Output installed packages in requirements format. packages are listed in a case-insensitive sorted order. z %prog [options])ext://sys.stderrr returnNc 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.)rrrrz--useruserz,Only output packages installed in user-site.z--all freeze_allz,Do not skip these packages in the output: {}z, )rrrz--exclude-editableexclude_editablez%Exclude editable package from output.r) Zcmd_optsZ add_optionrZ list_pathformatjoinDEV_PKGSZ list_excludeparserZinsert_option_group)selfrP/opt/alt/python310/lib/python3.10/site-packages/pip/_internal/commands/freeze.py add_optionssP    zFreezeCommand.add_optionsoptionsargsc Csptt}|js |t|jr||jt|t|j |j |j |j |j ||jdD] }tj|dq+tS)N)Z requirementZ local_onlyZ user_onlypathsisolatedskipr )setrrupdaterZexcludesrZcheck_list_path_optionrr rrpathZ isolated_modersysstdoutwriter)rr!r"r%linerrrrunMs"     zFreezeCommand.run)r N) __name__ __module__ __qualname____doc__ZusageZ log_streamsr rrstrintr.rrrrr s  4r )r*ZoptparsertypingrZpip._internal.clirZpip._internal.cli.base_commandrZpip._internal.cli.status_codesrZpip._internal.operations.freezerZpip._internal.utils.compatrrr rrrrs