[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@3.21.98.79: ~ $
U

+�aW�@sddlZddlZddlZddlZddlZddlZddlZddlmZddlm	Z	ddlm
Z
ddlZddlm
Z
mZddlmZmZddlmZGdd	�d	�Zejd
d��Zdd
d�Zdd�Zdd�Zddd�ZGdd�d�ZGdd�de�ZGdd�de�ZdS)�N)�defaultdict)�partial��wraps)�DistutilsOptionError�DistutilsFileError)�
LegacyVersion�parse)�SpecifierSetc@s eZdZdZdd�Zdd�ZdS)�StaticModulez0
    Attempt to load the module by the name
    c	CsLtj�|�}t|j��}|��}W5QRXt�|�}t|��	t
��|`dS�N)�	importlib�util�	find_spec�open�origin�read�astr	�vars�update�locals�self)r�name�spec�strm�src�module�r�9/tmp/pip-install-1bd_1mtk/setuptools/setuptools/config.py�__init__s
zStaticModule.__init__c
sXzt�fdd�|jjD��WStk
rR}ztdjft���|�W5d}~XYnXdS)Nc3sH|]@}t|tj�r|jD](}t|tj�r|j�krt�|j�VqqdSr)�
isinstancerZAssign�targets�Name�id�literal_eval�value)�.0Z	statement�target��attrrr�	<genexpr>!s
�z+StaticModule.__getattr__.<locals>.<genexpr>z#{self.name} has no attribute {attr})�nextr�body�	Exception�AttributeError�formatr)rr)�err(r�__getattr__s�
��zStaticModule.__getattr__N)�__name__�
__module__�__qualname__�__doc__rr1rrrrrsrc	cs,ztj�d|�dVW5tj�|�XdS)zH
    Add path to front of sys.path for the duration of the context.
    rN)�sys�path�remove�insert)r7rrr�
patch_path.s
r:Fc		Cs�ddlm}m}tj�|�}tj�|�s4td|��t��}t�	tj�
|��zJ|�}|rb|��ng}||krx|�|�|j
||d�t||j|d�}W5t�	|�Xt|�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<�osr7�abspath�isfiler�getcwd�chdir�dirname�find_config_files�append�parse_config_files�parse_configuration�command_options�configuration_to_dict)	�filepathZfind_othersr>r;r<Zcurrent_directory�distr=�handlersrrr�read_configuration:s*�
�
rNcCs.djft��}t�t||�}t|||�}|�S)z�
    Given a target object and option key, get that option from
    the target object, either through a get_{key} method or
    from an attribute directly.
    z	get_{key})r/r�	functoolsr�getattr)�
target_obj�keyZgetter_nameZby_attribute�getterrrr�_get_optionisrTcCs<tt�}|D]*}|jD]}t|j|�}|||j|<qq|S)z�Returns configuration data gathered by given handlers as a dict.

    :param list[ConfigHandler] handlers: Handlers list,
        usually from parse_configuration()

    :rtype: dict
    )r�dict�set_optionsrTrQ�section_prefix)rMZconfig_dict�handler�optionr%rrrrJus
rJcCs6t|||�}|��t|j|||j�}|��||fS)a�Performs additional parsing of configuration options
    for a distribution.

    Returns a list of used option handlers.

    :param Distribution distribution:
    :param dict command_options:
    :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: list
    )�ConfigOptionsHandlerr	�ConfigMetadataHandler�metadata�package_dir)�distributionrIr>�options�metarrrrH�s��rHc@s�eZdZdZdZiZd%dd�Zedd��Zdd	�Z	e
d&dd��Ze
d
d��Ze
dd��Z
e
dd��Ze
dd��Zedd��Zedd��Ze
d'dd��Ze
dd��Ze
d(dd��Zdd �Zd!d"�Zd#d$�ZdS))�
ConfigHandlerz1Handles metadata supplied in configuration files.NFcCs^i}|j}|��D].\}}|�|�s&q|�|d��d�}|||<q||_||_||_g|_dS)N��.)	rW�items�
startswith�replace�stripr>rQ�sectionsrV)rrQr_r>rhrW�section_name�section_optionsrrrr�s

zConfigHandler.__init__cCstd|jj��dS)�.Metadata item name to parser function mapping.z!%s must provide .parsers propertyN)�NotImplementedError�	__class__r2)rrrr�parsers�s
�zConfigHandler.parsersc	Cs�t�}|j}|j�||�}t|||�}||kr6t|��|r>dSd}|j�|�}|r�z||�}Wn tk
r~d}|jsz�YnX|r�dSt|d|d�}|dkr�t	|||�n||�|j
�|�dS)NFTzset_%s)�tuplerQ�aliases�getrP�KeyErrorrnr-r>�setattrrVrF)	rZoption_namer%�unknownrQZ
current_valueZskip_option�parser�setterrrr�__setitem__�s0zConfigHandler.__setitem__�,cCs8t|t�r|Sd|kr |��}n
|�|�}dd�|D�S)z�Represents value as a list.

        Value is split either by separator (defaults to comma) or by lines.

        :param value:
        :param separator: List items separator character.
        :rtype: list
        �
cSsg|]}|��r|���qSr)rg)r&�chunkrrr�
<listcomp>sz-ConfigHandler._parse_list.<locals>.<listcomp>)r �list�
splitlines�split)�clsr%�	separatorrrr�_parse_list�s



zConfigHandler._parse_listcCsPd}i}|�|�D]8}|�|�\}}}||kr:td|��|��||��<q|S)zPRepresents value as a dict.

        :param value:
        :rtype: dict
        �=z(Unable to parse option value to dict: %s)r��	partitionrrg)rr%r��result�linerR�sep�valrrr�_parse_dicts�zConfigHandler._parse_dictcCs|��}|dkS)zQRepresents value as boolean.

        :param value:
        :rtype: bool
        )�1�true�yes)�lower)rr%rrr�_parse_boolszConfigHandler._parse_boolcs�fdd�}|S)z�Returns a parser function to make sure field inputs
        are not files.

        Parses a value after getting the key so error messages are
        more informative.

        :param key:
        :rtype: callable
        cs d}|�|�rtd�����|S)N�file:zCOnly strings are accepted for the {0} field, files are not accepted)re�
ValueErrorr/)r%Zexclude_directive�rRrrru)s
��z3ConfigHandler._exclude_files_parser.<locals>.parserr)rrRrurr�r�_exclude_files_parsersz#ConfigHandler._exclude_files_parsercs\d}t|t�s|S|�|�s |S|t|�d�}dd�|�d�D�}d��fdd�|D��S)aORepresents value as a string, allowing including text
        from nearest files using `file:` directive.

        Directive is sandboxed and won't reach anything outside
        directory with setup.py.

        Examples:
            file: README.rst, CHANGELOG.md, src/file.txt

        :param str value:
        :rtype: str
        r�Ncss|]}tj�|���VqdSr)r?r7r@rg�r&r7rrrr*Isz,ConfigHandler._parse_file.<locals>.<genexpr>rxryc3s.|]&}��|�stj�|�r��|�VqdS)TN)�
_assert_localr?r7rA�
_read_filer��rrrr*Js

�)r �strre�lenr~�join)rr%Zinclude_directiverZ	filepathsrr�r�_parse_file2s

�zConfigHandler._parse_filecCs|�t���std|��dS)Nz#`file:` directive can not access %s)rer?rBr)rKrrrr�Qs�zConfigHandler._assert_localc
Cs.tj|dd��}|��W5QR�SQRXdS)Nzutf-8)�encoding)�iorr)rK�frrrr�WszConfigHandler._read_filec
Csd}|�|�s|S|�|d����d�}|��}d�|�}|p@d}t��}|r�|d|kr�||d}|�dd�}	t	|	�dkr�tj
�t��|	d�}|	d}q�|}nd|kr�tj
�t��|d�}t|��Dztt
|�|�WW5QR�Stk
�rt�|�}
YnXW5QRXt|
|�S)z�Represents value as a module attribute.

        Examples:
            attr: package.attr
            attr: package.module.attr

        :param str value:
        :rtype: str
        zattr:rbrcrr�/�)rerfrgr~�popr�r?rB�rsplitr�r7r:rPrr-r
�
import_module)rr%r]Zattr_directiveZ
attrs_path�	attr_name�module_name�parent_pathZcustom_path�partsrrrr�_parse_attr\s0



zConfigHandler._parse_attrcs�fdd�}|S)z�Returns parser function to represents value as a list.

        Parses a value applying given methods one after another.

        :param parse_methods:
        :rtype: callable
        cs|}�D]}||�}q|Srr)r%�parsed�method��
parse_methodsrrr	�s
z1ConfigHandler._get_parser_compound.<locals>.parser)rr�r	rr�r�_get_parser_compound�s	z"ConfigHandler._get_parser_compoundcCs6i}|pdd�}|��D]\}\}}||�||<q|S)z�Parses section options into a dictionary.

        Optionally applies a given parser to values.

        :param dict section_options:
        :param callable values_parser:
        :rtype: dict
        cSs|Srr)r�rrr�<lambda>��z6ConfigHandler._parse_section_to_dict.<locals>.<lambda>)rd)rrjZ
values_parserr%rR�_r�rrr�_parse_section_to_dict�s

z$ConfigHandler._parse_section_to_dictc	Cs<|��D].\}\}}z|||<Wqtk
r4YqXqdS)zQParses configuration file section.

        :param dict section_options:
        N)rdrr)rrjrr�r%rrr�
parse_section�s
zConfigHandler.parse_sectioncCsb|j��D]R\}}d}|r"d|}t|d|�dd�d�}|dkrTtd|j|f��||�q
dS)zTParses configuration file items from one
        or more related sections.

        rbz_%szparse_section%src�__Nz0Unsupported distribution option section: [%s.%s])rhrdrPrfrrW)rrirjZmethod_postfixZsection_parser_methodrrrr	�s"���zConfigHandler.parsecst�����fdd��}|S)z� this function will wrap around parameters that are deprecated

        :param msg: deprecation message
        :param warning_class: class of warning exception to be raised
        :param func: function to be wrapped around
        cst�����||�Sr)�warnings�warn)�args�kwargs��func�msg�
warning_classrr�config_handler�sz@ConfigHandler._deprecated_config_handler.<locals>.config_handlerr)rr�r�r�r�rr�r�_deprecated_config_handler�sz(ConfigHandler._deprecated_config_handler)F)rx)N)N)r2r3r4r5rWrpr�propertyrnrw�classmethodr�r�r�r�r��staticmethodr�r�r�r�r�r�r	r�rrrrra�s<

&

	



-
racsHeZdZdZddddd�ZdZd�fd	d
�	Zedd��Zd
d�Z	�Z
S)r[r\�url�description�classifiers�	platforms)Z	home_page�summary�
classifier�platformFNcstt|��|||�||_dSr)�superr[rr])rrQr_r>r]�rmrrr�s�zConfigMetadataHandler.__init__cCs^|j}|j}|j}|j}||||�|dt�||�||�|d�|�|d�dt�||||j|d�
S)rkz[The requires parameter is deprecated, please use install_requires for runtime dependencies.�license�license_filezDThe license_file parameter is deprecated, use license_files instead.)
r��keywords�provides�requires�	obsoletesr�r�r�Z
license_filesr��long_description�versionZproject_urls)r�r�r�r�r��DeprecationWarningr��_parse_version)r�
parse_listZ
parse_file�
parse_dictZexclude_files_parserrrrrn�s4�
��zConfigMetadataHandler.parserscCs�|�|�}||krB|��}tt|�t�r>d}t|jft����|S|�||j	�}t
|�r^|�}t|t�s�t|d�r�d�
tt|��}nd|}|S)zSParses `version` option value.

        :param value:
        :rtype: str

        zCVersion loaded from {value} does not comply with PEP 440: {version}�__iter__rcz%s)r�rgr r	rrr/rr�r]�callabler��hasattrr��map)rr%r��tmplrrrr�s 
�

z$ConfigMetadataHandler._parse_version)FN)r2r3r4rWrpZstrict_moderr�rnr��
__classcell__rrr�rr[�s��
r[c@sdeZdZdZedd��Zdd�Zdd�Zdd	�Zd
d�Z	dd
�Z
dd�Zdd�Zdd�Z
dd�ZdS)rZr_cCsV|j}t|jdd�}|j}|j}|j}|||||||||||||||j|j|t|d�S)rk�;�r�)Zzip_safeZuse_2to3Zinclude_package_datar]Zuse_2to3_fixersZuse_2to3_exclude_fixersZconvert_2to3_doctests�scriptsZeager_resourcesZdependency_linksZnamespace_packagesZinstall_requiresZsetup_requiresZ
tests_require�packages�entry_points�
py_modulesZpython_requires�cmdclass)r�rr�r��_parse_cmdclass�_parse_packagesr�r
)rr�Zparse_list_semicolonZ
parse_boolr�Zparse_cmdclassrrrrn?s2�zConfigOptionsHandler.parserscs$dd���fdd�|�|���D�S)NcSs8|�d�}||dd�}|d|�}t|�}t||�S)Nrcr�)�rfind�
__import__rP)Zqualified_class_name�idx�
class_name�pkg_namerrrr�
resolve_class_s

z;ConfigOptionsHandler._parse_cmdclass.<locals>.resolve_classcsi|]\}}|�|��qSrr�r&�k�v�r�rr�
<dictcomp>hs�z8ConfigOptionsHandler._parse_cmdclass.<locals>.<dictcomp>)r�rd)rr%rr�rr�^s	
�z$ConfigOptionsHandler._parse_cmdclasscCsjddg}|��}||kr"|�|�S||dk}|�|j�di��}|rTddlm}nddlm}|f|�S)zTParses `packages` option value.

        :param value:
        :rtype: list
        zfind:zfind_namespace:r�z
packages.findr)�find_namespace_packages)�
find_packages)rgr��parse_section_packages__findrhrq�
setuptoolsr�r�)rr%Zfind_directivesZ
trimmed_valueZfindns�find_kwargsr�rrrr�ms
�z$ConfigOptionsHandler._parse_packagescsT|�||j�}dddg�t�fdd�|��D��}|�d�}|dk	rP|d|d<|S)z�Parses `packages.find` configuration file section.

        To be used in conjunction with _parse_packages().

        :param dict section_options:
        �where�include�excludecs$g|]\}}|�kr|r||f�qSrrr��Z
valid_keysrrr{�szEConfigOptionsHandler.parse_section_packages__find.<locals>.<listcomp>Nr)r�r�rUrdrq)rrjZsection_datar�r�rr�rr��s�
�
z1ConfigOptionsHandler.parse_section_packages__findcCs|�||j�}||d<dS)z`Parses `entry_points` configuration file section.

        :param dict section_options:
        r�N)r�r��rrjr�rrr�parse_section_entry_points�sz/ConfigOptionsHandler.parse_section_entry_pointscCs.|�||j�}|�d�}|r*||d<|d=|S)N�*rb)r�r�rq)rrjr��rootrrr�_parse_package_data�s
z(ConfigOptionsHandler._parse_package_datacCs|�|�|d<dS)z`Parses `package_data` configuration file section.

        :param dict section_options:
        �package_dataN�r��rrjrrr�parse_section_package_data�sz/ConfigOptionsHandler.parse_section_package_datacCs|�|�|d<dS)zhParses `exclude_package_data` configuration file section.

        :param dict section_options:
        Zexclude_package_dataNr�r�rrr�"parse_section_exclude_package_data�s�z7ConfigOptionsHandler.parse_section_exclude_package_datacCs"t|jdd�}|�||�|d<dS)zbParses `extras_require` configuration file section.

        :param dict section_options:
        r�r�Zextras_requireN)rr�r�)rrjr�rrr�parse_section_extras_require�s
�z1ConfigOptionsHandler.parse_section_extras_requirecCs(|�||j�}dd�|��D�|d<dS)z^Parses `data_files` configuration file section.

        :param dict section_options:
        cSsg|]\}}||f�qSrrr�rrrr{�szAConfigOptionsHandler.parse_section_data_files.<locals>.<listcomp>�
data_filesN)r�r�rdr�rrr�parse_section_data_files�sz-ConfigOptionsHandler.parse_section_data_filesN)r2r3r4rWr�rnr�r�r�r�r�r�rrrrrrrrZ;s

	rZ)FF)F)rr�r?r6r�rOr
�collectionsrrr�
contextlib�distutils.errorsrrZ#setuptools.extern.packaging.versionrr	Z&setuptools.extern.packaging.specifiersr
r�contextmanagerr:rNrTrJrHrar[rZrrrr�<module>s8
�
/�
@[

Filemanager

Name Type Size Permission Actions
__init__.cpython-38.pyc File 8.42 KB 0644
_deprecation_warning.cpython-38.pyc File 520 B 0644
_imp.cpython-38.pyc File 2.01 KB 0644
archive_util.cpython-38.pyc File 5.59 KB 0644
build_meta.cpython-38.pyc File 8.74 KB 0644
config.cpython-38.pyc File 19.42 KB 0644
dep_util.cpython-38.pyc File 827 B 0644
depends.cpython-38.pyc File 5.08 KB 0644
dist.cpython-38.pyc File 35.36 KB 0644
errors.cpython-38.pyc File 820 B 0644
extension.cpython-38.pyc File 1.87 KB 0644
glob.cpython-38.pyc File 3.59 KB 0644
installer.cpython-38.pyc File 2.69 KB 0644
launch.cpython-38.pyc File 851 B 0644
lib2to3_ex.cpython-38.pyc File 2.6 KB 0644
monkey.cpython-38.pyc File 4.48 KB 0644
msvc.cpython-38.pyc File 41.73 KB 0644
namespaces.cpython-38.pyc File 3.47 KB 0644
package_index.cpython-38.pyc File 31.74 KB 0644
py34compat.cpython-38.pyc File 454 B 0644
sandbox.cpython-38.pyc File 15.05 KB 0644
unicode_utils.cpython-38.pyc File 1.06 KB 0644
version.cpython-38.pyc File 296 B 0644
wheel.cpython-38.pyc File 7.03 KB 0644
windows_support.cpython-38.pyc File 993 B 0644