<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
        integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ=="
        crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
</html>
B
    ReSZ                 @   s  d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlmZ d dlm	Z	 d dlm
Z
 d dlmZ d dlZd dlmZmZ d dlmZmZ d dlmZ G d	d
 d
Zejdd ZdddZdd Zdd ZdddZG dd dZG dd deZG dd deZdS )    N)defaultdict)partial)wraps)iglob)DistutilsOptionErrorDistutilsFileError)LegacyVersionparse)SpecifierSetc               @   s    e Zd ZdZdd Zdd ZdS )StaticModulez0
    Attempt to load the module by the name
    c          	   C   sL   t j|}t|j}| }W d Q R X t|}t| 	t
  | `d S )N)	importlibutil	find_specopenoriginreadastr	   varsupdatelocalsself)r   namespecstrmsrcmodule r   /builddir/build/BUILDROOT/alt-python37-setuptools-58.3.0-4.el8.x86_64/opt/alt/python37/lib/python3.7/site-packages/setuptools/config.py__init__   s    
zStaticModule.__init__c          
      sV   yt  fdd| jjD S  tk
rP } ztdjf t |W d d }~X Y nX d S )Nc             3   sH   | ]@}t |tjr|jD ](}t |tjr|j krt|jV  qqd S )N)
isinstancer   ZAssigntargetsNameidliteral_evalvalue).0Z	statementtarget)attrr   r   	<genexpr>$   s   
z+StaticModule.__getattr__.<locals>.<genexpr>z#{self.name} has no attribute {attr})nextr   body	ExceptionAttributeErrorformatr   )r   r'   er   )r'   r   __getattr__!   s    
zStaticModule.__getattr__N)__name__
__module____qualname____doc__r   r/   r   r   r   r   r      s   r   c          	   c   s,   zt jd|  dV  W dt j|  X dS )zH
    Add path to front of sys.path for the duration of the context.
    r   N)syspathinsertremove)r5   r   r   r   
patch_path0   s    
r8   Fc       	   	   C   s   ddl m}m} tj| } tj| s4td|  t }t	tj
|  zJ| }|rb| ng }| |krx||  |j||d t||j|d}W d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_errorsN)Zsetuptools.distr9   r:   osr5   abspathisfiler   getcwdchdirdirnamefind_config_filesappendparse_config_filesparse_configurationcommand_optionsconfiguration_to_dict)	filepathZfind_othersr<   r9   r:   Zcurrent_directorydistr;   handlersr   r   r   read_configuration<   s     
rL   c             C   s.   dj f t }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keyZgetter_nameZby_attributegetterr   r   r   _get_optioni   s    rR   c             C   sD   t t}x6| D ].}x(|jD ]}t|j|}|||j |< qW qW |S )zReturns configuration data gathered by given handlers as a dict.

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

    :rtype: dict
    )r   dictset_optionsrR   rO   section_prefix)rK   Zconfig_dicthandleroptionr$   r   r   r   rH   u   s    
rH   c             C   s6   t | ||}|  t| j||| j}|  ||fS )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)distributionrG   r<   optionsmetar   r   r   rF      s    rF   c               @   s   e Zd ZdZdZi Zd'ddZedd Zdd	 Z	e
d(ddZe
d)ddZe
dd Ze
dd Ze
dd Ze
dd Zedd Zedd Ze
d*ddZe
dd Ze
d+dd Zd!d" Zd#d$ Zd%d& ZdS ),ConfigHandlerz1Handles metadata supplied in configuration files.NFc             C   sb   i }| j }x:| D ].\}}||s(q||dd}|||< qW || _|| _|| _g | _d S )N .)	rU   items
startswithreplacestripr<   rO   sectionsrT   )r   rO   r]   r<   rf   rU   section_namesection_optionsr   r   r   r      s    
zConfigHandler.__init__c             C   s   t d| jj dS )z.Metadata item name to parser function mapping.z!%s must provide .parsers propertyN)NotImplementedError	__class__r0   )r   r   r   r   parsers   s    zConfigHandler.parsersc       	      C   s   t  }| j}| j||}t|||}||kr6t||r>d S d}| j|}|ry||}W n  tk
r~   d}| jsz Y nX |rd S t|d| d }|d krt	||| n|| | j
| d S )NFTzset_%s)tuplerO   aliasesgetrN   KeyErrorrk   r+   r<   setattrrT   rD   )	r   Zoption_namer$   unknownrO   Zcurrent_valueZskip_optionparsersetterr   r   r   __setitem__   s0    zConfigHandler.__setitem__,c             C   s8   t |tr|S d|kr | }n
||}dd |D S )zRepresents 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
        
c             S   s   g | ]}|  r|  qS r   )re   )r%   chunkr   r   r   
<listcomp>  s    z-ConfigHandler._parse_list.<locals>.<listcomp>)r   list
splitlinessplit)clsr$   	separatorr   r   r   _parse_list   s    



zConfigHandler._parse_listc          	      sn   d}| j  |d}g }xR|D ]J t fdd|D r\|tdd ttj D  q|  qW |S )a  Equivalent 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
        )*?[]{})r}   c             3   s   | ]}| kV  qd S )Nr   )r%   char)r$   r   r   r(     s    z1ConfigHandler._parse_list_glob.<locals>.<genexpr>c             s   s    | ]}t j|t  V  qd S )N)r=   r5   relpathr@   )r%   r5   r   r   r   r(     s   )	r~   anyextendsortedr   r=   r5   r>   rD   )r|   r$   r}   Zglob_charactersvaluesZexpanded_valuesr   )r$   r   _parse_list_glob  s    

zConfigHandler._parse_list_globc             C   sT   d}i }xF|  |D ]8}||\}}}||kr<td| | || < qW |S )zPRepresents value as a dict.

        :param value:
        :rtype: dict
        =z(Unable to parse option value to dict: %s)r~   	partitionr   re   )r|   r$   r}   resultlinerP   sepvalr   r   r   _parse_dict   s    
zConfigHandler._parse_dictc             C   s   |  }|dkS )zQRepresents value as boolean.

        :param value:
        :rtype: bool
        )1trueyes)lower)r|   r$   r   r   r   _parse_bool3  s    zConfigHandler._parse_boolc                s    fdd}|S )zReturns 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
        c                s    d}|  |rtd | S )Nzfile:zCOnly strings are accepted for the {0} field, files are not accepted)rc   
ValueErrorr-   )r$   Zexclude_directive)rP   r   r   rr   I  s    
z3ConfigHandler._exclude_files_parser.<locals>.parserr   )r|   rP   rr   r   )rP   r   _exclude_files_parser=  s    	z#ConfigHandler._exclude_files_parserc                s\   d}t |ts|S ||s |S |t|d }dd |dD }d fdd|D S )aO  Represents 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
        zfile:Nc             s   s   | ]}t j| V  qd S )N)r=   r5   r>   re   )r%   r5   r   r   r   r(   k  s    z,ConfigHandler._parse_file.<locals>.<genexpr>ru   rv   c             3   s.   | ]&}  |stj|r |V  qdS )TN)_assert_localr=   r5   r?   
_read_file)r%   r5   )r|   r   r   r(   m  s   )r   strrc   lenr{   join)r|   r$   Zinclude_directiver   Z	filepathsr   )r|   r   _parse_fileT  s    


zConfigHandler._parse_filec             C   s   |  t std|  d S )Nz#`file:` directive can not access %s)rc   r=   r@   r   )rI   r   r   r   r   r  s    zConfigHandler._assert_localc          	   C   s"   t j| dd
}| S Q R X d S )Nzutf-8)encoding)ior   r   )rI   fr   r   r   r   w  s    zConfigHandler._read_filec          	   C   s  d}| |s|S ||d d}| }d|}|p@d}t }|r|d |kr||d  }|dd}	t	|	dkrtj
t |	d }|	d }q|}nd|krtj
t |d }t|4 ytt||S  tk
r   t|}
Y nX W dQ R X t|
|S )	zRepresents value as a module attribute.

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

        :param str value:
        :rtype: str
        zattr:r`   ra   r   r   /   N)rc   rd   re   r{   popr   r=   r@   rsplitr   r5   r8   rN   r   r+   r   import_module)r|   r$   r[   Zattr_directiveZ
attrs_path	attr_namemodule_nameparent_pathZcustom_pathpartsr   r   r   r   _parse_attr|  s0    



zConfigHandler._parse_attrc                s    fdd}|S )zReturns parser function to represents value as a list.

        Parses a value applying given methods one after another.

        :param parse_methods:
        :rtype: callable
        c                s   | }x D ]}||}q
W |S )Nr   )r$   parsedmethod)parse_methodsr   r   r	     s    
z1ConfigHandler._get_parser_compound.<locals>.parser   )r|   r   r	   r   )r   r   _get_parser_compound  s    
z"ConfigHandler._get_parser_compoundc             C   s:   i }|pdd }x$|  D ]\}\}}||||< qW |S )zParses section options into a dictionary.

        Optionally applies a given parser to values.

        :param dict section_options:
        :param callable values_parser:
        :rtype: dict
        c             S   s   | S )Nr   )r   r   r   r   <lambda>      z6ConfigHandler._parse_section_to_dict.<locals>.<lambda>)rb   )r|   rh   Zvalues_parserr$   rP   _r   r   r   r   _parse_section_to_dict  s
    
z$ConfigHandler._parse_section_to_dictc          	   C   s@   x:|  D ].\}\}}y|| |< W q
 tk
r6   Y q
X q
W dS )zQParses configuration file section.

        :param dict section_options:
        N)rb   ro   )r   rh   r   r   r$   r   r   r   parse_section  s
    zConfigHandler.parse_sectionc             C   sf   x`| j  D ]R\}}d}|r$d| }t| d| ddd}|dkrVtd| j|f || qW dS )zTParses configuration file items from one
        or more related sections.

        r`   z_%szparse_section%sra   __Nz0Unsupported distribution option section: [%s.%s])rf   rb   rN   rd   r   rU   )r   rg   rh   Zmethod_postfixZsection_parser_methodr   r   r   r	     s    zConfigHandler.parsec                s   t   fdd}|S )zthis 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
        c                 s   t   | |S )N)warningswarn)argskwargs)funcmsgwarning_classr   r   config_handler  s    z@ConfigHandler._deprecated_config_handler.<locals>.config_handler)r   )r   r   r   r   r   r   )r   r   r   r   _deprecated_config_handler  s    z(ConfigHandler._deprecated_config_handler)F)ru   )ru   )N)N)r0   r1   r2   r3   rU   rm   r   propertyrk   rt   classmethodr~   r   r   r   r   r   staticmethodr   r   r   r   r   r   r	   r   r   r   r   r   r_      s0   
&
-r_   c                   sH   e Zd ZdZdddddZdZd fd	d
	Zedd Zdd Z	  Z
S )rY   rZ   urldescriptionclassifiers	platforms)Z	home_pagesummary
classifierplatformFNc                s   t t| ||| || _d S )N)superrY   r   r[   )r   rO   r]   r<   r[   )rj   r   r   r     s    

zConfigMetadataHandler.__init__c             C   s^   | j }| j}| j}| j}|||| |dt|| |||d| |ddt|||| 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   keywordsprovidesrequires	obsoletesr   r   r   Zlicense_filesr   long_descriptionversionproject_urls)r~   r   r   r   r   DeprecationWarningr   _parse_version)r   
parse_listZ
parse_file
parse_dictZexclude_files_parserr   r   r   rk     s.    
zConfigMetadataHandler.parsersc             C   s   |  |}||krB| }tt|tr>d}t|jf t |S | || j	}t
|r^| }t|tst|drdtt|}nd| }|S )zSParses `version` option value.

        :param value:
        :rtype: str

        zCVersion loaded from {value} does not comply with PEP 440: {version}__iter__ra   z%s)r   re   r   r	   r   r   r-   r   r   r[   callabler   hasattrr   map)r   r$   r   tmplr   r   r   r   ?  s    


z$ConfigMetadataHandler._parse_version)FN)r0   r1   r2   rU   rm   Zstrict_moder   r   rk   r   __classcell__r   r   )rj   r   rY     s   "rY   c               @   sd   e Zd ZdZedd Zdd Zdd Zdd	 Zd
d Z	dd Z
dd Zdd Zdd Zdd ZdS )rX   r]   c             C   sN   | j }t| j dd}| j}| j}| j}||||||||||| j| j|t|dS )z.Metadata item name to parser function mapping.;)r}   )Zzip_safeZinclude_package_datar[   scriptsZeager_resourcesZdependency_linksZnamespace_packagesZinstall_requiresZsetup_requiresZtests_requirepackagesentry_points
py_modulesZpython_requirescmdclass)r~   r   r   r   _parse_cmdclass_parse_packagesr   r
   )r   r   Zparse_list_semicolonZ
parse_boolr   Zparse_cmdclassr   r   r   rk   g  s(    zConfigOptionsHandler.parsersc                s$   dd   fdd|  | D S )Nc             S   s8   |  d}| |d d  }| d | }t|}t||S )Nra   r   )rfind
__import__rN   )Zqualified_class_nameidx
class_namepkg_namer   r   r   r   resolve_class  s
    
z;ConfigOptionsHandler._parse_cmdclass.<locals>.resolve_classc                s   i | ]\}} ||qS r   r   )r%   kv)r   r   r   
<dictcomp>  s    z8ConfigOptionsHandler._parse_cmdclass.<locals>.<dictcomp>)r   rb   )r   r$   r   )r   r   r     s    	z$ConfigOptionsHandler._parse_cmdclassc             C   sj   ddg}|  }||kr"| |S ||d k}| | jdi }|rTddlm} nddlm} |f |S )zTParses `packages` option value.

        :param value:
        :rtype: list
        zfind:zfind_namespace:r   zpackages.findr   )find_namespace_packages)find_packages)re   r~   parse_section_packages__findrf   rn   
setuptoolsr   r   )r   r$   Zfind_directivesZtrimmed_valueZfindnsfind_kwargsr   r   r   r   r     s    
z$ConfigOptionsHandler._parse_packagesc                sT   |  || j}dddg t fdd| D }|d}|dk	rP|d |d< |S )zParses `packages.find` configuration file section.

        To be used in conjunction with _parse_packages().

        :param dict section_options:
        whereincludeexcludec                s$   g | ]\}}| kr|r||fqS r   r   )r%   r   r   )
valid_keysr   r   rx     s    zEConfigOptionsHandler.parse_section_packages__find.<locals>.<listcomp>Nr   )r   r~   rS   rb   rn   )r   rh   Zsection_datar   r   r   )r   r   r     s    

z1ConfigOptionsHandler.parse_section_packages__findc             C   s   |  || j}|| d< dS )z`Parses `entry_points` configuration file section.

        :param dict section_options:
        r   N)r   r~   )r   rh   r   r   r   r   parse_section_entry_points  s    z/ConfigOptionsHandler.parse_section_entry_pointsc             C   s.   |  || j}|d}|r*||d< |d= |S )Nr   r`   )r   r~   rn   )r   rh   r   rootr   r   r   _parse_package_data  s    
z(ConfigOptionsHandler._parse_package_datac             C   s   |  || d< dS )z`Parses `package_data` configuration file section.

        :param dict section_options:
        package_dataN)r   )r   rh   r   r   r   parse_section_package_data  s    z/ConfigOptionsHandler.parse_section_package_datac             C   s   |  || d< dS )zhParses `exclude_package_data` configuration file section.

        :param dict section_options:
        Zexclude_package_dataN)r   )r   rh   r   r   r   "parse_section_exclude_package_data  s    z7ConfigOptionsHandler.parse_section_exclude_package_datac             C   s"   t | jdd}| ||| d< dS )zbParses `extras_require` configuration file section.

        :param dict section_options:
        r   )r}   Zextras_requireN)r   r~   r   )r   rh   r   r   r   r   parse_section_extras_require  s    z1ConfigOptionsHandler.parse_section_extras_requirec             C   s(   |  || j}dd | D | d< dS )z^Parses `data_files` configuration file section.

        :param dict section_options:
        c             S   s   g | ]\}}||fqS r   r   )r%   r   r   r   r   r   rx     s    zAConfigOptionsHandler.parse_section_data_files.<locals>.<listcomp>
data_filesN)r   r   rb   )r   rh   r   r   r   r   parse_section_data_files  s    z-ConfigOptionsHandler.parse_section_data_filesN)r0   r1   r2   rU   r   rk   r   r   r   r   r   r   r   r   r   r   r   r   r   rX   c  s   

rX   )FF)F) r   r   r=   r4   r   rM   r   collectionsr   r   r   globr   
contextlibdistutils.errorsr   r   Z#setuptools.extern.packaging.versionr   r	   Z&setuptools.extern.packaging.specifiersr
   r   contextmanagerr8   rL   rR   rH   rF   r_   rY   rX   r   r   r   r   <module>   s2   
-
  c_