File: //opt/osm/venv/lib/python3.10/site-packages/setuptools/__pycache__/installer.cpython-310.pyc
o
0i� � @ s� d dl Z d dlZd dlZd dlZd dlZd dlZd dlmZ d dlm Z d dl
Z
d dlmZ ddl
mZ dd� Zd d
� Zdd� ZdS )
� N)�log)�DistutilsError)�Wheel� )�SetuptoolsDeprecationWarningc C s( t | t�r | �� S t | ttf�sJ �| S )z8Ensure find-links option end-up being a list of strings.)�
isinstance�str�split�tuple�list)�
find_links� r
�B/opt/osm/venv/lib/python3.10/site-packages/setuptools/installer.py�_fixup_find_links s
r c C sH t �dt� zt�d� W n tjy | �dtj� Y nw t |�}| �
d�}d|v r0td��dtj
vo9dtj
v}d tj
v rBd
}n
d|v rM|d d }nd
}d
|v r_t|d
d �d
d
� ng }| jrj|�| j� tj�| �� �}t�� }t�|�D ]}||v r�|�|�r�| S q{t�� ��} tjdddddd| g}
|r�|
�d� |d
ur�|
�d|f� |p�g D ] }|
�d|f� q�|
�|jp�t|�� zt�|
� W n tj y� } ztt|��|�d
}~ww t!t"�"tj�#| d��d �}
tj�#||
�$� �}|
�%|� t�&|tj�#|d��}tj'j(||d�} | W d
� S 1 �sw Y d
S )zLFetch an egg needed for building.
Use pip/wheel to fetch/build a wheel.z\setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.�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_urlr r z-m�pipz--disable-pip-version-checkz --no-depsz-wz--quietz--index-urlz--find-linksz*.whlr zEGG-INFO)�metadata))�warnings�warnr �
pkg_resources�get_distribution�DistributionNotFoundZannouncer �WARN�strip_markerZget_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 sx ��
��
�
��
��&�r<