Revonzy Mini Shell

Revonzy Mini Shell

Şuanki Dizin: /proc/self/root/usr/lib/python3.9/site-packages/setuptools/__pycache__/
Dosya Yükle :
Şuanki Dosya : //proc/self/root/usr/lib/python3.9/site-packages/setuptools/__pycache__/config.cpython-39.pyc

a

���f�T�@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
    cCs`tj�|�}t|j��}|��}Wd�n1s40Yt�|�}t|��	t
��|`dS�N)�	importlib�util�	find_spec�open�origin�read�astr	�vars�update�locals�self)r�name�specZstrm�src�module�r�5/usr/lib/python3.9/site-packages/setuptools/config.py�__init__s&
zStaticModule.__init__c
s^zt�fdd�|jjD��WStyX}z$tdjfit����|�WYd}~n
d}~00dS)Nc3sH|]@}t|tj�r|jD](}t|tj�r|j�krt�|j�VqqdSr)�
isinstancerZAssign�targets�Name�idZ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__rr/rrrrrsrc	cs8z$tj�d|�dVWtj�|�ntj�|�0dS)zH
    Add path to front of sys.path for the duration of the context.
    rN)�sys�path�insert�remove)r5rrr�
patch_path.sr8Fc		Cs�ddlm}m}tj�|�}tj�|�s4td|��t��}t�	tj�
|��zT|�}|rb|��ng}||vrx|�|�|j
||d�t||j|d�}Wt�	|�nt�	|�0t|�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.distr9r:�osr5�abspath�isfiler�getcwd�chdir�dirnameZfind_config_files�appendZparse_config_files�parse_configuration�command_options�configuration_to_dict)	�filepathZfind_othersr<r9r:Zcurrent_directoryZdistr;�handlersrrr�read_configuration:s(�
�rIcCs2djfit���}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rOcCs<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_optionsrOrL�section_prefix)rHZconfig_dictZhandler�optionr#rrrrFus
rFcCs6t|||�}|��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)ZdistributionrEr<�options�metarrrrD�s��rDc@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��.)	rR�items�
startswith�replace�stripr<rL�sectionsrQ)rrLrXr<rarR�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__r0)rrrr�parsers�s
�zConfigHandler.parsersc	Cs�t�}|j}|j�||�}t|||�}||ur6t|��|r>dSd}|j�|�}|r~z||�}Wnty|d}|jsx�Yn0|r�dSt|d|d�}|dur�t	|||�n||�|j
�|�dS)NFTzset_%s)�tuplerL�aliases�getrK�KeyErrorrgr+r<�setattrrQrC)	rZoption_namer#�unknownrLZ
current_valueZskip_option�parser�setterrrr�__setitem__�s0zConfigHandler.__setitem__�,cCs8t|t�r|Sd|vr |��}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)r`)r$�chunkrrr�
<listcomp>�z-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{�	partitionrr`)ryr#rz�result�linerM�sep�valrrr�_parse_dicts�zConfigHandler._parse_dictcCs|��}|dvS)zQRepresents value as boolean.

        :param value:
        :rtype: bool
        )�1�trueZyes)�lower)ryr#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)r^�
ValueErrorr-)r#Zexclude_directive�rMrrrn)s
��z3ConfigHandler._exclude_files_parser.<locals>.parserr)ryrMrnrr�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=r5r>r`�r$r5rrrr(Iruz,ConfigHandler._parse_file.<locals>.<genexpr>rqrrc3s.|]&}��|�stj�|�r��|�VqdS)TN)�
_assert_localr=r5r?�
_read_filer��ryrrr(Js
�)r�strr^�lenrx�join)ryr#Zinclude_directiverZ	filepathsrr�r�_parse_file2s

�zConfigHandler._parse_filecCs|�t���std|��dS)Nz#`file:` directive can not access %s)r^r=r@r)rGrrrr�Qs�zConfigHandler._assert_localcCs:tj|dd��}|��Wd�S1s,0YdS)Nzutf-8)�encoding)�iorr)rG�frrrr�WszConfigHandler._read_filec	Cs4d}|�|�s|S|�|d����d�}|��}d�|�}|p@d}t��}|r�|d|vr�||d}|�dd�}	t	|	�dkr�tj
�t��|	d�}|	d}q�|}nd|vr�tj
�t��|d�}t|��Nztt
|�|�WWd�St�yt�|�}
Yn0Wd�n1�s 0Yt|
|�S)	z�Represents value as a module attribute.

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

        :param str value:
        :rtype: str
        zattr:r[r\rr�/�N)r^r_r`rx�popr�r=r@�rsplitr�r5r8rKrr+r
�
import_module)ryr#rWZattr_directiveZ
attrs_pathZ	attr_nameZmodule_name�parent_pathZcustom_path�partsrrrr�_parse_attr\s0



0zConfigHandler._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)ryr�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>�ruz6ConfigHandler._parse_section_to_dict.<locals>.<lambda>)r])ryrcZ
values_parserr#rM�_r�rrr�_parse_section_to_dict�s

z$ConfigHandler._parse_section_to_dictc	Cs:|��D],\}\}}z|||<Wqty2Yq0qdS)zQParses configuration file section.

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

        r[z_%szparse_section%sr\�__Nz0Unsupported distribution option section: [%s.%s])rar]rKr_rrR)rrbrcZmethod_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�����|i|��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)rq)N)N)r0r1r2r3rRrir�propertyrgrp�classmethodr{r�r�r�r��staticmethodr�r�r�r�r�r�r	r�rrrrrZ�s<

&

	



-
rZcsHeZdZdZddddd�ZdZd�fd	d
�	Zedd��Zd
d�Z	�Z
S)rUrV�url�description�classifiers�	platforms)Z	home_pageZsummaryZ
classifier�platformFNcstt|��|||�||_dSr)�superrUrrW)rrLrXr<rW�rfrrr�s�zConfigMetadataHandler.__init__cCs^|j}|j}|j}|j}||||�|dt�||�||�|d�|�|d�dt�||||j|d�
S)rdz[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)r{r�r�r�r��DeprecationWarningr��_parse_version)r�
parse_listZ
parse_file�
parse_dictZexclude_files_parserrrrrg�s4�
��zConfigMetadataHandler.parserscCs�|�|�}||krF|��}tt|�t�rBd}t|jfit�����|S|�||j	�}t
|�rb|�}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__r\z%s)r�r`rr	rrr-rr�rW�callabler��hasattrr��map)rr#r�Ztmplrrrr�s 
�

z$ConfigMetadataHandler._parse_version)FN)r0r1r2rRriZstrict_moderr�rgr��
__classcell__rrr�rrU�s��
rUc@s\eZdZdZedd��Zdd�Zdd�Zdd	�Zd
d�Z	dd
�Z
dd�Zdd�Zdd�Z
dS)rTrXcCsN|j}t|jdd�}|j}|j}|||||||||||||||j|j|td�S)rd�;�rz)Zzip_safeZuse_2to3Zinclude_package_datarWZuse_2to3_fixersZuse_2to3_exclude_fixersZconvert_2to3_doctestsZscriptsZeager_resourcesZdependency_linksZnamespace_packagesZinstall_requiresZsetup_requiresZ
tests_requireZpackages�entry_pointsZ
py_modulesZpython_requires)r{rr�r��_parse_packagesr�r
)rr�Zparse_list_semicolonZ
parse_boolr�rrrrg?s.�zConfigOptionsHandler.parserscCsnddg}|��}||vr"|�|�S||dk}|�|j�di��}|rTddlm}nddlm}|fi|��S)zTParses `packages` option value.

        :param value:
        :rtype: list
        zfind:zfind_namespace:r�z
packages.findr)�find_namespace_packages)�
find_packages)r`r{�parse_section_packages__findrarjZ
setuptoolsr�r�)rr#Zfind_directivesZ
trimmed_valueZfindns�find_kwargsr�rrrr�\s
�z$ConfigOptionsHandler._parse_packagescsR|�||j�}gd��t�fdd�|��D��}|�d�}|durN|d|d<|S)z�Parses `packages.find` configuration file section.

        To be used in conjunction with _parse_packages().

        :param dict section_options:
        )�whereZincludeZexcludecs$g|]\}}|�vr|r||f�qSrr�r$�k�v�Z
valid_keysrrrt�ruzEConfigOptionsHandler.parse_section_packages__find.<locals>.<listcomp>r�Nr)r�r{rPr]rj)rrcZsection_datar�r�rr�rr�us��
z1ConfigOptionsHandler.parse_section_packages__findcCs|�||j�}||d<dS)z`Parses `entry_points` configuration file section.

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

        :param dict section_options:
        Zpackage_dataN�r��rrcrrr�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�)rrcr�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�rrrrt�ruzAConfigOptionsHandler.parse_section_data_files.<locals>.<listcomp>Z
data_filesN)r�r{r]r�rrr�parse_section_data_files�sz-ConfigOptionsHandler.parse_section_data_filesN)r0r1r2rRr�rgr�r�r�r�r�r�r�r�rrrrrT;s

	rT)FF)F)rr�r=r4r�rJr
�collectionsrrr�
contextlibZdistutils.errorsrrZ#setuptools.extern.packaging.versionrr	Z&setuptools.extern.packaging.specifiersr
r�contextmanagerr8rIrOrFrDrZrUrTrrrr�<module>s6
�
/�
@[

EliteHackz.ORG
Revonzy Mini Shell
root@revonzy.com

Linux 65-254-81-4.cprapid.com 5.14.0-284.11.1.el9_2.x86_64 #1 SMP PREEMPT_DYNAMIC Tue May 9 05:49:00 EDT 2023 x86_64
Apache
65.254.81.4