403Webshell
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 :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : C:/cygwin64/lib/python3.6/site-packages/setuptools/__pycache__/config.cpython-36.opt-1.pyc
3

��aqZ�@sddlZddlZddlZddlZddlZddlZddlZddlmZddlm	Z	ddlm
Z
ddlmZddl
Z
ddlmZmZddlmZmZddlmZGd	d
�d
�Ze
jdd��Zddd�Zdd�Zdd�Zddd�ZGdd�d�ZGdd�de�ZGdd�de�ZdS)�N)�defaultdict)�partial)�wraps)�iglob)�DistutilsOptionError�DistutilsFileError)�Version�InvalidVersion)�SpecifierSetc@s eZdZdZdd�Zdd�ZdS)�StaticModulez0
    Attempt to load the module by the name
    c	CsLtjj|�}t|j��}|j�}WdQRXtj|�}t|�j	t
��|`dS)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__csVyt�fdd�|jjD��Stk
rP}ztdjft���|�WYdd}~XnXdS)Nc3sH|]@}t|tj�r|jD](}t|tj�r|j�krtj|j�VqqdS)N)�
isinstancerZAssignZtargets�Name�idZliteral_eval�value)�.0Z	statement�target)�attrrr�	<genexpr>$s
z+StaticModule.__getattr__.<locals>.<genexpr>z#{self.name} has no attribute {attr})�nextrZbody�	Exception�AttributeError�formatr)rr%�er)r%r�__getattr__!s
zStaticModule.__getattr__N)�__name__�
__module__�__qualname__�__doc__rr,rrrrrsrccs,ztjjd|�dVWdtjj|�XdS)zH
    Add path to front of sys.path for the duration of the context.
    rN)�sys�path�insert�remove)r2rrr�
patch_path0s
r5Fc	Cs�ddlm}m}tjj|�}tjj|�s4td|��tj�}tj	tjj
|��zJ|�}|rb|j�ng}||krx|j|�|j
||d�t||j|d�}Wdtj	|�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_errorsN)Zsetuptools.distr6r7�osr2�abspath�isfiler�getcwd�chdir�dirnameZfind_config_files�appendZparse_config_files�parse_configuration�command_options�configuration_to_dict)	�filepathZfind_othersr9r6r7Zcurrent_directoryZdistr8�handlersrrr�read_configuration<s 
rFcCs.djft��}tjt||�}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rLcCsDtt�}x6|D].}x(|jD]}t|j|�}|||j|<qWqW|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_optionsrLrI�section_prefix)rEZconfig_dictZhandler�optionr"rrrrCus
rCcCs6t|||�}|j�t|j|||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)ZdistributionrBr9�options�metarrrrA�srAc@s�eZdZdZdZiZd'dd�Zedd��Zdd	�Z	e
d(dd��Ze
d)d
d��Ze
dd��Z
e
dd��Ze
dd��Ze
dd��Zedd��Zedd��Ze
d*dd��Ze
dd��Ze
d+dd ��Zd!d"�Zd#d$�Zd%d&�ZdS),�
ConfigHandlerz1Handles metadata supplied in configuration files.NFcCsbi}|j}x:|j�D].\}}|j|�s(q|j|d�jd�}|||<qW||_||_||_g|_dS)N��.)	rO�items�
startswith�replace�stripr9rI�sectionsrN)rrIrUr9r^rO�section_name�section_optionsrrrr�s
zConfigHandler.__init__cCstd|jj��dS)z.Metadata item name to parser function mapping.z!%s must provide .parsers propertyN)�NotImplementedError�	__class__r-)rrrr�parsers�szConfigHandler.parsersc	Cs�t�}|j}|jj||�}t|||�}||kr6t|��|r>dSd}|jj|�}|r�y||�}Wn tk
r~d}|jsz�YnX|r�dSt|d|d�}|dkr�t	|||�n||�|j
j|�dS)NFTzset_%s)�tuplerI�aliases�getrH�KeyErrorrcr(r9�setattrrNr@)	rZoption_namer"�unknownrIZ
current_valueZskip_option�parser�setterrrr�__setitem__�s0zConfigHandler.__setitem__�,cCs8t|t�r|Sd|kr |j�}n
|j|�}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|]}|j�r|j��qSr)r])r#�chunkrrr�
<listcomp>sz-ConfigHandler._parse_list.<locals>.<listcomp>)r�list�
splitlines�split)�clsr"�	separatorrrr�_parse_list�s



zConfigHandler._parse_listcsnd}|j�|d�}g}xR|D]J�t�fdd	�|D��r\|jtd
d	�ttjj���D���q|j��qW|S)aEquivalent to _parse_list() but expands any glob patterns using glob().

        However, unlike with glob() calls, the results remain relative paths.

        :param value:
        :param separator: List items separator character.
        :rtype: list
        �*�?�[�]�{�})ruc3s|]}|�kVqdS)Nr)r#�char)r"rrr&sz1ConfigHandler._parse_list_glob.<locals>.<genexpr>css |]}tjj|tj��VqdS)N)r:r2�relpathr=)r#r2rrrr&s)rwrxryrzr{r|)	rv�any�extend�sortedrr:r2r;r@)rtr"ruZglob_characters�valuesZexpanded_valuesr)r"r�_parse_list_globs

zConfigHandler._parse_list_globcCsTd}i}xF|j|�D]8}|j|�\}}}||kr<td|��|j�||j�<qW|S)zPRepresents value as a dict.

        :param value:
        :rtype: dict
        �=z(Unable to parse option value to dict: %s)rv�	partitionrr])rtr"ru�result�linerJ�sep�valrrr�_parse_dict s
zConfigHandler._parse_dictcCs|j�}|dkS)zQRepresents value as boolean.

        :param value:
        :rtype: bool
        �1�true�yes)r�r�r�)�lower)rtr"rrr�_parse_bool3szConfigHandler._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}|j|�rtdj����|S)Nzfile:zCOnly strings are accepted for the {0} field, files are not accepted)r[�
ValueErrorr*)r"Zexclude_directive)rJrrrjIs
z3ConfigHandler._exclude_files_parser.<locals>.parserr)rtrJrjr)rJr�_exclude_files_parser=s	z#ConfigHandler._exclude_files_parsercs\d}t|t�s|S|j|�s |S|t|�d�}dd�|jd�D�}dj�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
        zfile:Ncss|]}tjj|j��VqdS)N)r:r2r;r])r#r2rrrr&ksz,ConfigHandler._parse_file.<locals>.<genexpr>rmrnc3s2|]*}�j|�sdrtjj|�r�j|�VqdS)TN)�
_assert_localr:r2r<�
_read_file)r#r2)rtrrr&ms)r�strr[�lenrs�join)rtr"Zinclude_directiverZ	filepathsr)rtr�_parse_fileTs


zConfigHandler._parse_filecCs|jtj��std|��dS)Nz#`file:` directive can not access %s)r[r:r=r)rDrrrr�rszConfigHandler._assert_localc	Cs"tj|dd��
}|j�SQRXdS)Nzutf-8)�encoding)�iorr)rD�frrrr�wszConfigHandler._read_filecCsd}|j|�s|S|j|d�j�jd�}|j�}dj|�}|p@d}tj�}|r�|d|kr�||d}|jdd�}	t	|	�dkr�tj
jtj�|	d�}|	d}q�|}nd|kr�tj
jtj�|d�}t|��4ytt
|�|�Stk
r�tj|�}
YnXWdQRXt|
|�S)	z�Represents value as a module attribute.

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

        :param str value:
        :rtype: str
        zattr:rXrYrr�/�N)r[r\r]rs�popr�r:r=�rsplitr�r2r5rHrr(r�
import_module)rtr"rTZattr_directiveZ
attrs_pathZ	attr_nameZmodule_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|}x�D]}||�}q
W|S)Nr)r"�parsed�method)�
parse_methodsrrr�s
z1ConfigHandler._get_parser_compound.<locals>.parser)rtr�rr)r�r�_get_parser_compound�s
z"ConfigHandler._get_parser_compoundcCs:i}|pdd�}x$|j�D]\}\}}||�||<qW|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|S)Nr)r�rrr�<lambda>�sz6ConfigHandler._parse_section_to_dict.<locals>.<lambda>)rZ)rtr`Z
values_parserr"rJ�_r�rrr�_parse_section_to_dict�s

z$ConfigHandler._parse_section_to_dictcCs@x:|j�D].\}\}}y|||<Wq
tk
r6Yq
Xq
WdS)zQParses configuration file section.

        :param dict section_options:
        N)rZrg)rr`rr�r"rrr�
parse_section�s
zConfigHandler.parse_sectioncCsfx`|jj�D]R\}}d}|r$d|}t|d|jdd�d�}|dkrVtd|j|f��||�qWdS)zTParses configuration file items from one
        or more related sections.

        rXz_%szparse_section%srY�__Nz0Unsupported distribution option section: [%s.%s])r^rZrHr\rrO)rr_r`Zmethod_postfixZsection_parser_methodrrrr�szConfigHandler.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
        cstj����||�S)N)�warnings�warn)�args�kwargs)�func�msg�
warning_classrr�config_handler�sz@ConfigHandler._deprecated_config_handler.<locals>.config_handler)r)rr�r�r�r�r)r�r�r�r�_deprecated_config_handler�sz(ConfigHandler._deprecated_config_handler)F)rm)rm)N)N)r-r.r/r0rOrer�propertyrcrl�classmethodrvr�r�r�r�r��staticmethodr�r�r�r�r�r�rr�rrrrrW�s0
&
-rWcsHeZdZdZddddd�ZdZd�fd	d
�	Zedd��Zd
d�Z	�Z
S)rRrSZurl�description�classifiers�	platforms)Z	home_pageZsummaryZ
classifier�platformFNcstt|�j|||�||_dS)N)�superrRrrT)rrIrUr9rT)rbrrrs

zConfigMetadataHandler.__init__cCs^|j}|j}|j}|j}||||j|dt�||j||�|d�|j|d�dt�||||j|d�
S)z.Metadata item name to parser function mapping.z[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��keywordsZprovidesZrequiresZ	obsoletesr�r�r�Z
license_filesr�Zlong_description�versionZproject_urls)rvr�r�r�r��DeprecationWarningr��_parse_version)r�
parse_listZ
parse_file�
parse_dictZexclude_files_parserrrrrcs.
zConfigMetadataHandler.parserscCs�|j|�}||krV|j�}yt|�Wn*tk
rPd}t|jft����YnX|S|j||j�}t	|�rr|�}t
|t�s�t|d�r�dj
tt|��}nd|}|S)zSParses `version` option value.

        :param value:
        :rtype: str

        zCVersion loaded from {value} does not comply with PEP 440: {version}�__iter__rYz%s)r�r]rr	rr*rr�rT�callablerr��hasattrr��map)rr"r�Ztmplrrrr�?s"


z$ConfigMetadataHandler._parse_version)FN)r-r.r/rOreZstrict_moderr�rcr��
__classcell__rr)rbrrRs"rRc@sdeZdZdZedd��Zdd�Zdd�Zdd	�Zd
d�Z	dd
�Z
dd�Zdd�Zdd�Z
dd�ZdS)rQrUcCsN|j}t|jdd�}|j}|j}|j}|||||||||||j|j|t|d�S)z.Metadata item name to parser function mapping.�;)ru)Zzip_safeZinclude_package_datarT�scriptsZeager_resourcesZdependency_linksZnamespace_packagesZinstall_requiresZsetup_requiresZ
tests_requireZpackages�entry_pointsZ
py_modulesZpython_requiresZcmdclass)rvrr�r��_parse_cmdclass�_parse_packagesr�r
)rr�Zparse_list_semicolonZ
parse_boolr�Zparse_cmdclassrrrrcis(zConfigOptionsHandler.parserscs$dd���fdd�|j|�j�D�S)NcSs8|jd�}||dd�}|d|�}t|�}t||�S)NrYr�)�rfind�
__import__rH)Zqualified_class_name�idx�
class_nameZpkg_namerrrr�
resolve_class�s

z;ConfigOptionsHandler._parse_cmdclass.<locals>.resolve_classcsi|]\}}�|�|�qSrr)r#�k�v)r�rr�
<dictcomp>�sz8ConfigOptionsHandler._parse_cmdclass.<locals>.<dictcomp>)r�rZ)rr"r)r�rr��s	z$ConfigOptionsHandler._parse_cmdclasscCsjddg}|j�}||kr"|j|�S||dk}|j|jjdi��}|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)r]rv�parse_section_packages__findr^rfZ
setuptoolsr�r�)rr"Zfind_directivesZ
trimmed_valueZfindns�find_kwargsr�rrrr��s
z$ConfigOptionsHandler._parse_packagescsT|j||j�}dddg�t�fdd�|j�D��}|jd�}|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�includeZexcludecs$g|]\}}|�kr|r||f�qSrr)r#r�r�)�
valid_keysrrrp�szEConfigOptionsHandler.parse_section_packages__find.<locals>.<listcomp>Nr)r�rvrMrZrf)rr`Zsection_datar�r�r)r�rr��s

z1ConfigOptionsHandler.parse_section_packages__findcCs|j||j�}||d<dS)z`Parses `entry_points` configuration file section.

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

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

        :param dict section_options:
        Zexclude_package_dataN)r�)rr`rrr�"parse_section_exclude_package_data�sz7ConfigOptionsHandler.parse_section_exclude_package_datacCs"t|jdd�}|j||�|d<dS)zbParses `extras_require` configuration file section.

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

        :param dict section_options:
        cSsg|]\}}||f�qSrr)r#r�r�rrrrp�szAConfigOptionsHandler.parse_section_data_files.<locals>.<listcomp>Z
data_filesN)r�r�rZ)rr`r�rrr�parse_section_data_files�sz-ConfigOptionsHandler.parse_section_data_filesN)r-r.r/rOr�rcr�r�r�r�r�r�r�r�r�rrrrrQes

rQ)FF)F) rr�r:r1r�rGr�collectionsrrrZglobr�
contextlibZdistutils.errorsrrZ#setuptools.extern.packaging.versionrr	Z&setuptools.extern.packaging.specifiersr
r�contextmanagerr5rFrLrCrArWrRrQrrrr�<module>s2
-
ca

Youez - 2016 - github.com/yon3zu
LinuXploit