관리-도구
편집 파일: req_command.cpython-38.pyc
U &?�f�/ � @ s^ 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 e�2e3�Z4e1j5e1j6e1j7gZ8eed�dd�Z9G dd� 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 s6 t dd�dd�� tttt tt d�� �fdd�}|S )zNDecorator for common logic related to managing temporary directories. N)�registryr c S s t D ]}| �|d� qd S )NF)�KEEPABLE_TEMPDIR_TYPES� set_delete)r! �t� r% �K/opt/hc_python/lib/python3.8/site-packages/pip/_internal/cli/req_command.py�configure_tempdir_registry7 s z0with_cleanup.<locals>.configure_tempdir_registry)�self�options�argsr c sR | j d k st�|jr� | j � z�| ||�W S tk rL � | j � � Y nX d S �N)�tempdir_registry�AssertionError�no_cleanr )r( r) r* �r'