Your IP : 3.139.86.53
a
(�ReSZ � @ s d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlmZ d dlm Z d dlm
Z
d dlmZ d dl
Z
d dlmZmZ d dlmZmZ d dlmZ G d d
� d
�Ze
jdd� �Zddd�Zdd� Zdd� Zddd�ZG dd� d�ZG dd� de�ZG dd� de�ZdS )� N)�defaultdict)�partial��wraps)�iglob)�DistutilsOptionError�DistutilsFileError)�
LegacyVersion�parse)�SpecifierSetc @ s e Zd ZdZdd� Zdd� ZdS )�StaticModulez0
Attempt to load the module by the name
c C s` t j�|�}t|j��}|�� }W d � n1 s40 Y t�|�}t| �� t
� � | `d S �N)� importlib�util� find_spec�open�origin�read�astr
�vars�update�locals�self)r �name�spec�strm�src�module� r ��/builddir/build/BUILDROOT/alt-python39-setuptools-58.3.0-2.el8.x86_64/opt/alt/python39/lib/python3.9/site-packages/setuptools/config.py�__init__ s &
zStaticModule.__init__c
s^ zt � fdd�| jjD ��W S tyX } z$tdjf i t� ���|�W Y d }~n
d }~0 0 d S )Nc 3 sH | ]@}t |tj�r|jD ](}t |tj�r|j� krt�|j�V qqd S r
)�
isinstancer �Assign�targets�Name�id�literal_eval�value)�.0Z statement�target��attrr r � <genexpr># s
�z+StaticModule.__getattr__.<locals>.<genexpr>z#{self.name} has no attribute {attr})�nextr �body� Exception�AttributeError�formatr )r r+ �er r* r �__getattr__! s �
��zStaticModule.__getattr__N)�__name__�
__module__�__qualname__�__doc__r r3 r r r r r s r c c s8 z$t j�d| � dV W t j�| � nt j�| � 0 dS )zH
Add path to front of sys.path for the duration of the context.
r N)�sys�path�insert�remove)r9 r r r �
patch_path0 s r<