관리-도구
편집 파일: req_command.cpython-311.pyc
� �Dg�/ � � � d Z ddlZddlmZ ddlmZ ddlmZmZm Z m Z ddlmZ ddl mZ ddlmZ dd lmZ dd lmZmZ ddlmZ ddlmZ dd lmZ ddlmZ ddlmZ ddlm Z ddl!m"Z" ddl#m$Z$m%Z%m&Z&m'Z' ddl(m)Z) ddl*m+Z+ ddl,m-Z- ddl.m/Z/m0Z0m1Z1 ej2 e3� � Z4e1j5 e1j6 e1j7 gZ8dedefd�Z9 G d� de� � Z:dS )z�Contains the RequirementCommand base class. This class is in a separate module so the commands that do not always need PackageFinder capability don't unnecessarily import the PackageFinder machinery and all its vendored dependencies, etc. � N)�partial)�Values)�Any�List�Optional�Tuple)� WheelCache)� cmdoptions)�IndexGroupCommand)�SessionCommandMixin)�CommandError�PreviousBuildDirError)� LinkCollector)� PackageFinder)�SelectionPreferences)�TargetPython)� PipSession)�BuildTracker)�RequirementPreparer)�install_req_from_editable�install_req_from_line�#install_req_from_parsed_requirement�install_req_from_req_string)�parse_requirements)�InstallRequirement)�BaseResolver)� TempDirectory�TempDirectoryTypeRegistry� tempdir_kinds�func�returnc � � �� dt ddfd��dt dt dt t dt t f�� fd�}|S ) zNDecorator for common logic related to managing temporary directories. �registryr! Nc �F � t D ]}| � |d� � �d S )NF)�KEEPABLE_TEMPDIR_TYPES� set_delete)r# �ts �}/builddir/build/BUILD/imunify360-venv-2.4.0/opt/imunify360/venv/lib/python3.11/site-packages/pip/_internal/cli/req_command.py�configure_tempdir_registryz0with_cleanup.<locals>.configure_tempdir_registry7 s4 � �'� *� *�A�����5�)�)�)�)� *� *� �self�options�argsc � �� | j �J �|j r �| j � � �| ||� � S # t $ r �| j � � � w xY w�N)�tempdir_registry�no_cleanr )r+ r, r- r) r s ��r( �wrapperzwith_cleanup.<locals>.wrapper; s� �� � �$�0�0�0��� >�&�&�t�'<�=�=�=� ��4��g�t�,�,�,��$� � � � '�&�t�'<�=�=�=�� ���s �0 �A)r �RequirementCommandr r r r �int)r r2 r) s ` @r( �with_cleanupr5 2 sy ��� � *�-F� *�4� *� *� *� *�� ��+1��9=�c��� �#��� � � � � � � �Nr* c � � � e Zd Zdededdf� fd�Zededefd�� � Ze d"d e ded edede d edee dedefd�� � Ze d#dede dedee d edededededee deeedf defd�� � Zdee dede dedee f d�Zede ddfd�� � Z d$deded ee dee de f d!�Z� xZS )%r3 r- �kwr! Nc � �� t � � j |i |�� | j � t j � � � � d S r/ )�super�__init__�cmd_opts� add_optionr r1 )r+ r- r7 � __class__s �r( r: zRequirementCommand.__init__O sD �� ������$�%�"�%�%�%�� � � ��!4�!6�!6�7�7�7�7�7r* r, c � � d| j v rdS dS )zEDetermines which resolver should be used, based on the given options.zlegacy-resolver�legacy� resolvelib)�deprecated_features_enabled�r, s r( �determine_resolver_variantz-RequirementCommand.determine_resolver_variantT s � � �� C�C�C��8��|r* r �temp_build_dir� build_tracker�session�finder� use_user_site�download_dir� verbosityc �X � |j } | �J �d} | � |� � }|dk r&d|j v }|rt � d� � n'd} d}d|j v rt � d� � t | |j ||j |j |||j ||j |||| �� � S ) zQ Create a RequirementPreparer instance for the given parameters. NFr@ z fast-depsz�pip is using lazily downloaded wheels using HTTP range requests to obtain dependency information. This experimental feature is enabled through --use-feature=fast-deps and it is not ready for production.Tz;fast-deps has no effect when used with the legacy resolver.)� build_dir�src_dirrI �build_isolation�check_build_depsrE rF �progress_barrG �require_hashesrH � lazy_wheelrJ �legacy_resolver)�pathrC �features_enabled�logger�warningr rM rN rO rP rQ ) �clsrD r, rE rF rG rH rI rJ �temp_build_dir_pathrS �resolver_variantrR s r( �make_requirement_preparerz,RequirementCommand.make_requirement_preparer\ s� � � -�1��"�.�.�.����9�9�'�B�B���|�+�+�$��(@�@�J�� ����"�� � �� #�O��J��g�6�6�6����Q�� � � #�)��O�%�#�3�$�5�'�� �-��"�1�'�!��+� � � � r* FT�to-satisfy-only�preparer�wheel_cache�ignore_installed�ignore_requires_python�force_reinstall�upgrade_strategy� use_pep517�py_version_info.c �d � t t |j | �� � }| � |� � } | dk r=ddl}|j j j j � ||||||j |||| |�� � S ddl}|j j j j � ||||||j |||| |�� � S )zF Create a Resolver instance for the given parameters. )�isolatedrc r@ r N)r] rG r^ �make_install_reqrH �ignore_dependenciesr_ r` ra rb rd ) r r � isolated_moderC �,pip._internal.resolution.resolvelib.resolver� _internal� resolutionr@ �resolver�Resolverrh �(pip._internal.resolution.legacy.resolverr? )rX r] rG r, r^ rH r_ r` ra rb rc rd rg rZ �pips r( � make_resolverz RequirementCommand.make_resolver� s� � �$ #�'��*�!� � � �� �9�9�'�B�B�� �|�+�+�?�?�?�?��=�+�6�?�H�H�!��'�!1�+�$+�$?�!1�'=� /�!1� /� I� � � � 8�7�7�7��}�'�.�7�@�@���#�-�'� '� ;�-�#9�+�-�+� A� � � r* c �� � g }|j D ]E}t |d|||�� � D ].}t ||j d�� � }|� |� � �/�F|D ]E} t | d|j |j dt |dd� � �� � }|� |� � �F|j D ]D} t | d|j |j t |dd� � �� � }|� |� � �E|j D ]l}t ||||� � � D ]V}t ||j |j d|j r|j � d� � nd� � � }|� |� � �W�mt d� |D � � � � rd|_ |sy|j sr|j skd| j i} |j rAt# d j di t'