관리-도구
편집 파일: req_tracker.cpython-35.pyc
��ReR � @ s3 d d l m Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l m Z d d l m Z d d l m Z e r� d d l m Z d d l m Z m Z m Z m Z m Z m Z d d l m Z d d l m Z e j e � Z e j d d � � Z e j d d � � Z Gd d � d e � Z! d S)� )�absolute_importN)�contextlib2)� TempDirectory)�MYPY_CHECK_RUNNING)� TracebackType)�Dict�Iterator�Optional�Set�Type�Union)�InstallRequirement)�Linkc k s� t j } t � } i } xU | j � D]G \ } } y | | | | <Wn t k ra | | | <Yn X| | | <q% Wz d VWd xO | j � D]A \ } } | | k r� | | =q� t | t � s� t � | | | <q� WXd S)N)�os�environ�object�items�KeyError� isinstance�str�AssertionError)�changes�target�non_existent_marker�saved_values�name� new_value�original_value� r ��/builddir/build/BUILDROOT/alt-python35-pip-20.2.4-5.el8.x86_64/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/req/req_tracker.py�update_env_context_manager s r c c s� t j j d � } t j � �o } | d k rn | j t d d � � j } | j t d | � � t j d | � t | � � } | VWd QRXWd QRXd S)N�PIP_REQ_TRACKER�kindzreq-trackerz Initialized build tracking at %s)r r �getr � ExitStack� enter_contextr �pathr �logger�debug�RequirementTracker)�root�ctx�trackerr r r �get_requirement_tracker2 s r- c @ sy e Z d Z d d � Z d d � Z d d � Z d d � Z d d � Z d d � Z d d � Z e j d d � � Z d S)r) c C s, | | _ t � | _ t j d | j � d S)NzCreated build tracker: %s)�_root�set�_entriesr'