관리-도구
편집 파일: installer.cpython-38.pyc
U �Re� � @ sp d dl Z d dlZd dlZd dlZd dlZd dlmZ d dlmZ d dl Z d dl mZ dd� Zdd� Z d d � ZdS )� N)�log)�DistutilsError)�Wheelc C s( t | t�r| �� S t | ttf�s$t�| S )z8Ensure find-links option end-up being a list of strings.)� isinstance�str�split�tuple�list�AssertionError)� find_links� r ��/builddir/build/BUILDROOT/alt-python38-setuptools-58.3.0-2.el8.x86_64/opt/alt/python38/lib/python3.8/site-packages/setuptools/installer.py�_fixup_find_links s r c C sH zt �d� W n$ t jk r2 | �dtj� Y nX t|�}| �d�}d|krVtd��dt j kohdt j k}dt j krzd }nd |kr�|d d }nd }d|kr�t|d d �d d � ng }| jr�|� | j� t j�| �� �}t �� }t �|�D ]}||kr�|�|�r�| S q�t�� ��(} tjd ddddd| g} |�r>| �d� |d k �rV| � d|f� |�p^g D ]}| � d|f� �q`| �|j�p�t|�� zt�| � W n4 tjk �r� } ztt|��|�W 5 d }~X Y nX tt�t j� | d��d �} t j� || �!� �}| �"|� t �#|t j� |d��}t j$j%||d�} | W 5 Q R � S Q R X d S )zLFetch an egg needed for building. Use pip/wheel to fetch/build a wheel.�wheelz,WARNING: The wheel package is not available.�easy_installZallow_hostszQthe `allow-hosts` option is not supported when using pip to install requirements.Z PIP_QUIETZPIP_VERBOSEZ PIP_INDEX_URLN� index_url� r z-m�pipz--disable-pip-version-checkz --no-depsz-wz--quietz--index-urlz--find-linksz*.whlr zEGG-INFO)�metadata)&� pkg_resources�get_distribution�DistributionNotFound�announcer �WARN�strip_marker�get_option_dictr �os�environr Zdependency_links�extend�path�realpathZget_egg_cache_dir�Environment�find_distributions�can_add�tempfile�TemporaryDirectory�sys� executable�append�urlr � subprocess� check_call�CalledProcessErrorr �glob�join�egg_nameZinstall_as_egg�PathMetadata�Distribution� from_filename)�dist�req�opts�quietr r Zeggs_dir�environmentZegg_distZtmpdir�cmd�link�er � dist_locationZ dist_metadatar r r �fetch_build_egg sr � � � �r<