Viewing File: /opt/alt/python38/lib/python3.8/site-packages/setuptools/__pycache__/config.cpython-38.pyc
U
+aW @ s d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlmZ d dlm Z d dlm
Z
d dlZd dlm
Z
mZ d dlmZmZ d dlmZ G dd d Zejd
d Zdd
dZdd Zdd ZdddZG dd dZG dd deZG dd deZdS ) N)defaultdict)partialwraps)DistutilsOptionErrorDistutilsFileError)
LegacyVersionparse)SpecifierSetc @ s e Zd ZdZdd Zdd ZdS )StaticModulez0
Attempt to load the module by the name
c C sL t j|}t|j}| }W 5 Q R X t|}t| t
| `d S N) importlibutil find_specopenoriginreadastr varsupdatelocalsself)r namespecstrmsrcmodule r 9/tmp/pip-install-1bd_1mtk/setuptools/setuptools/config.py__init__ s
zStaticModule.__init__c
sX zt fdd| jjD W S tk
rR } ztdjf t |W 5 d }~X Y nX d S )Nc 3 sH | ]@}t |tjr|jD ](}t |tjr|j krt|jV qqd S r )
isinstancer ZAssigntargetsNameidliteral_evalvalue).0Z statementtargetattrr r <genexpr>! s
z+StaticModule.__getattr__.<locals>.<genexpr>z#{self.name} has no attribute {attr})nextr body ExceptionAttributeErrorformatr )r r) er r( r __getattr__ s
zStaticModule.__getattr__N)__name__
__module____qualname____doc__r r1 r r r r r s r c c s, zt jd| dV W 5 t j| X dS )zH
Add path to front of sys.path for the duration of the context.
r N)syspathremoveinsert)r7 r r r
patch_path. s
r: Fc C s ddl m}m} tj| } tj| s4td| t }t tj
| zJ| }|rb| ng }| |krx|| |j
||d t||j|d}W 5 t | 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_errors)Zsetuptools.distr; r<