| Server IP : 127.0.0.1 / Your IP : 216.73.216.109 Web Server : Apache/2.4.54 (Win64) OpenSSL/1.1.1q PHP/8.1.10 System : Windows NT DESKTOP-E5T4RUN 10.0 build 19045 (Windows 10) AMD64 User : SERVERWEB ( 0) PHP Version : 8.1.10 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/cygwin64/lib/python3.6/site-packages/setuptools/__pycache__/ |
Upload File : |
3
��aqZ � @ 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)�Version�InvalidVersion)�SpecifierSetc @ s e Zd ZdZdd� Zdd� ZdS )�StaticModulez0
Attempt to load the module by the name
c C sL t jj|�}t|j��}|j� }W d Q R X tj|�}t| �j t
� � | `d S )N)� importlib�util� find_spec�open�origin�read�ast�parse�vars�update�locals�self)r �name�specZstrm�src�module� r �/usr/lib/python3.6/config.py�__init__ s
zStaticModule.__init__c sV yt � fdd�| jjD ��S tk
rP } ztdjf t� ��|�W Y d d }~X nX d S )Nc 3 sH | ]@}t |tj�r|jD ](}t |tj�r|j� krtj|j�V qqd S )N)�
isinstancer ZAssignZtargets�Name�idZliteral_eval�value)�.0Z statement�target)�attrr r � <genexpr>$ s
z+StaticModule.__getattr__.<locals>.<genexpr>z#{self.name} has no attribute {attr})�nextr Zbody� Exception�AttributeError�formatr )r r% �er )r% r �__getattr__! s
zStaticModule.__getattr__N)�__name__�
__module__�__qualname__�__doc__r r, r r r r r s r c c s, zt jjd| � dV W dt jj| � X dS )zH
Add path to front of sys.path for the duration of the context.
r N)�sys�path�insert�remove)r2 r r r �
patch_path0 s
r5 Fc C s� ddl m}m} tjj| �} tjj| �s4td| ��tj� }tj tjj
| �� zJ|� }|rb|j� ng }| |krx|j| � |j
||d� t||j|d�}W dtj |� X t|�S )a, Read given configuration file and returns options from it as a dict.
:param str|unicode filepath: Path to configuration file
to get options from.
:param bool find_others: Whether to search for other configuration files
which could be on in various places.
:param bool ignore_option_errors: Whether to silently ignore
options, values of which could not be resolved (e.g. due to exceptions
in directives such as file:, attr:, etc.).
If False exceptions are propagated as expected.
:rtype: dict
r )�Distribution�
_Distributionz%Configuration file %s does not exist.)� filenames)�ignore_option_errorsN)Zsetuptools.distr6 r7 �osr2 �abspath�isfiler �getcwd�chdir�dirnameZfind_config_files�appendZparse_config_files�parse_configuration�command_options�configuration_to_dict) �filepathZfind_othersr9 r6 r7 Zcurrent_directoryZdistr8 �handlersr r r �read_configuration<