<!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>

Re?                 @   s  d  d l  m Z m 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 m Z d  d l m Z d  d l m Z d d d	 d
  Z d d   Z d d d  Z Gd d   d e  Z Gd d   d e  Z Gd d   d e  Z d S)    )absolute_importunicode_literalsN)defaultdict)partial)DistutilsOptionErrorDistutilsFileError)import_module)string_typesFc       	      C   s   d d l  m } m } t j j |   }  t j j |   sJ t d |    t j   } t j	 t j j
 |    zi |   } | r | j   n g  } |  | k r | j |   | j | d | t | | j d | } Wd t j	 |  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)Zsetuptools.distr
   r   ospathabspathisfiler   getcwdchdirdirnamefind_config_filesappendparse_config_filesparse_configurationcommand_optionsconfiguration_to_dict)	filepathZfind_othersr   r
   r   Zcurrent_directorydistr   handlers r   /builddir/build/BUILDROOT/alt-python35-setuptools-36.3.0-4.el8.x86_64/opt/alt/python35/lib/python3.5/site-packages/setuptools/config.pyread_configuration   s$    	r    c             C   s   t  t  } x |  D]w } | j } | j } x\ | j D]Q } t | d | d  } | d k ro t | |  } n	 |   } | | | | <q5 Wq W| S)zReturns configuration data gathered by given handlers as a dict.

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

    :rtype: dict
    zget_%sN)r   dictsection_prefix
target_objset_optionsgetattr)r   Zconfig_dicthandlerZ	obj_aliasr#   optiongettervaluer   r   r   r   <   s    			r   c             C   sE   t  |  j | |  } | j   t |  | |  } | j   | | g 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
    )ConfigMetadataHandlermetadataparseConfigOptionsHandler)distributionr   r   metaoptionsr   r   r   r   Y   s    

r   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    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 d d   Z d d    Z d S)!ConfigHandlerz1Handles metadata supplied in configuration files.NFc             C   s   i  } |  j  } xQ | j   D]C \ } } | j |  s: q | j | d  j d  } | | | <q W| |  _ | |  _ | |  _ g  |  _ d  S)N .)	r"   items
startswithreplacestripr   r#   sectionsr$   )selfr#   r0   r   r8   r"   section_namesection_optionsr   r   r   __init__   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____name__)r9   r   r   r   parsers   s    zConfigHandler.parsersc       	      C   s  t    } |  j } |  j j | |  } t | | |  } | | k rQ t |   | r[ d  Sd } |  j j |  } | r y | |  } Wn$ t k
 r d } |  j s   Yn X| r d  St | d | d   } | d  k r t	 | | |  n
 | |  |  j
 j |  d  S)NFTzset_%s)tupler#   aliasesgetr%   KeyErrorr@   	Exceptionr   setattrr$   r   )	r9   Zoption_namer)   unknownr#   Zcurrent_valueZskip_optionparsersetterr   r   r   __setitem__   s0    			
zConfigHandler.__setitem__,c             C   sN   t  | t  r | Sd | k r. | j   } n | j |  } 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  |  ] } | j    r | j     q Sr   )r7   ).0chunkr   r   r   
<listcomp>   s   	 z-ConfigHandler._parse_list.<locals>.<listcomp>)
isinstancelist
splitlinessplit)clsr)   	separatorr   r   r   _parse_list   s    
zConfigHandler._parse_listc             C   st   d } i  } xa |  j  |  D]P } | j |  \ } } } | | k rV t d |   | j   | | j   <q W| S)zPRepresents value as a dict.

        :param value:
        :rtype: dict
        =z(Unable to parse option value to dict: %s)rV   	partitionr   r7   )rT   r)   rU   resultlinekeysepvalr   r   r   _parse_dict   s    zConfigHandler._parse_dictc             C   s   | j    } | d k S)zQRepresents value as boolean.

        :param value:
        :rtype: bool
        1trueyes)r_   r`   ra   )lower)rT   r)   r   r   r   _parse_bool   s    zConfigHandler._parse_boolc                s~   d } t  | t  s | S| j |  s, | S| t |  d  } d d   | j d  D } d j   f d d   | D  S)ai  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: LICENSE
            file: README.rst, CHANGELOG.md, src/file.txt

        :param str value:
        :rtype: str
        zfile:Nc             s   s'   |  ] } t  j j | j    Vq d  S)N)r   r   r   r7   )rM   r   r   r   r   	<genexpr>  s    z,ConfigHandler._parse_file.<locals>.<genexpr>rK   rL   c             3   sE   |  ]; }   j  |  s d  r t j j |  r   j |  Vq d S)TN)_assert_localr   r   r   
_read_file)rM   r   )rT   r   r   rd   	  s   )rP   r	   r5   lenrS   join)rT   r)   Zinclude_directivespecZ	filepathsr   )rT   r   _parse_file   s    zConfigHandler._parse_filec             C   s)   |  j  t j    s% t d |    d  S)Nz#`file:` directive can not access %s)r5   r   r   r   )r   r   r   r   re     s    zConfigHandler._assert_localc          	   C   s-   t  j |  d d  } | j   SWd  QRXd  S)Nencodingzutf-8)ioopenread)r   fr   r   r   rf     s    zConfigHandler._read_filec             C   s   d } | j  |  s | S| j | d  j   j d  } | j   } d j |  } | p^ d } t j j d t	 j
    z t |  } t | |  } Wd t j d d  t _ X| S)zRepresents value as a module attribute.

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

        :param str value:
        :rtype: str
        zattr:r2   r3   r<   r   N   )r5   r6   r7   rS   poprh   sysr   insertr   r   r   r%   )rT   r)   Zattr_directiveZ
attrs_path	attr_namemodule_namemoduler   r   r   _parse_attr  s    !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,   B  s    z1ConfigHandler._get_parser_compound.<locals>.parser   )rT   rz   r,   r   )rz   r   _get_parser_compound9  s    	z"ConfigHandler._get_parser_compoundc             C   sO   i  } | p d d   } x0 | j    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>W  s    z6ConfigHandler._parse_section_to_dict.<locals>.<lambda>)r4   )rT   r;   Zvalues_parserr)   r[   _r]   r   r   r   _parse_section_to_dictL  s
    
z$ConfigHandler._parse_section_to_dictc             C   sJ   xC | j    D]5 \ } \ } } y | |  | <Wq t k
 rA Yq Xq Wd S)zQParses configuration file section.

        :param dict section_options:
        N)r4   rD   )r9   r;   namer}   r)   r   r   r   parse_section\  s
    zConfigHandler.parse_sectionc             C   s   x |  j  j   D]s \ } } d } | r2 d | } t |  d | j d d  d  } | d k ry t d |  j | f   | |  q Wd S)zTParses configuration file items from one
        or more related sections.

        r2   z_%szparse_section%sr3   __Nz0Unsupported distribution option section: [%s.%s])r8   r4   r%   r6   r   r"   )r9   r:   r;   Zmethod_postfixZsection_parser_methodr   r   r   r,   h  s    
	zConfigHandler.parse)r?   
__module____qualname____doc__r"   rB   r<   propertyr@   rJ   classmethodrV   r^   rc   rj   staticmethodre   rf   rw   r{   r~   r   r,   r   r   r   r   r1   s   s&   &
 r1   c               @   sX   e  Z d  Z d Z d d d d d d d d	 i Z d
 Z e d d    Z d d   Z d S)r*   r+   Z	home_pageurlsummarydescription
classifierclassifiersplatform	platformsFc             C   sa   |  j  } |  j } d | d | d | d | d | d |  j | |  d | d | d	 | d
 |  j i
 S)z.Metadata item name to parser function mapping.r   keywordsprovidesrequires	obsoletesr   licenser   long_descriptionversion)rV   rj   r{   _parse_version)r9   
parse_listZ
parse_filer   r   r   r@     s    		zConfigMetadataHandler.parsersc             C   sk   |  j  |  } t |  r$ |   } t | t  sg t | d  r] d j t t |   } n
 d | } | S)zSParses `version` option value.

        :param value:
        :rtype: str

        __iter__r3   z%s)rw   callablerP   r	   hasattrrh   mapstr)r9   r)   r   r   r   r   r     s    	
z$ConfigMetadataHandler._parse_versionN)	r?   r   r   r"   rB   Zstrict_moder   r@   r   r   r   r   r   r*     s   r*   c               @   s|   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 S)r-   r0   c          "   C   s   |  j  } t |  j  d d } |  j } |  j } d | d | d | d | d | d | d	 | d
 | d | d | d | d | d | d | d |  j d |  j d | i S)z.Metadata item name to parser function mapping.rU   ;Zzip_safeZuse_2to3Zinclude_package_datapackage_dirZuse_2to3_fixersZuse_2to3_exclude_fixersZconvert_2to3_doctestsscriptsZeager_resourcesZdependency_linksZnamespace_packagesZinstall_requiresZsetup_requiresZtests_requirepackagesentry_points
py_modules)rV   r   rc   r^   _parse_packagesrj   )r9   r   Zparse_list_semicolonZ
parse_boolZ
parse_dictr   r   r   r@     s*    					zConfigOptionsHandler.parsersc             C   sZ   d } | j  |  s" |  j |  S|  j |  j j d i    } d d l m } | |   S)zTParses `packages` option value.

        :param value:
        :rtype: list
        zfind:zpackages.findr   )find_packages)r5   rV   parse_section_packages__findr8   rC   
setuptoolsr   )r9   r)   Zfind_directivefind_kwargsr   r   r   r   r     s    z$ConfigOptionsHandler._parse_packagesc                sv   |  j  | |  j  } d d d g   t   f d d   | j   D  } | j d  } | d k	 rr | d | d <| S)zParses `packages.find` configuration file section.

        To be used in conjunction with _parse_packages().

        :param dict section_options:
        whereincludeexcludec                s4   g  |  ]* \ } } |   k r | r | | f  q Sr   r   )rM   kv)
valid_keysr   r   rO     s   	 zEConfigOptionsHandler.parse_section_packages__find.<locals>.<listcomp>Nr   )r~   rV   r!   r4   rC   )r9   r;   Zsection_datar   r   r   )r   r   r     s    "z1ConfigOptionsHandler.parse_section_packages__findc             C   s#   |  j  | |  j  } | |  d <d S)z`Parses `entry_points` configuration file section.

        :param dict section_options:
        r   N)r~   rV   )r9   r;   rx   r   r   r   parse_section_entry_points  s    z/ConfigOptionsHandler.parse_section_entry_pointsc             C   s?   |  j  | |  j  } | j d  } | r; | | d <| d =| S)N*r2   )r~   rV   rC   )r9   r;   rx   rootr   r   r   _parse_package_data
  s    
z(ConfigOptionsHandler._parse_package_datac             C   s   |  j  |  |  d <d S)z`Parses `package_data` configuration file section.

        :param dict section_options:
        package_dataN)r   )r9   r;   r   r   r   parse_section_package_data  s    z/ConfigOptionsHandler.parse_section_package_datac             C   s   |  j  |  |  d <d S)zhParses `exclude_package_data` configuration file section.

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

        :param dict section_options:
        rU   r   Zextras_requireN)r   rV   r~   )r9   r;   r   r   r   r   parse_section_extras_require#  s    z1ConfigOptionsHandler.parse_section_extras_requireN)r?   r   r   r"   r   r@   r   r   r   r   r   r   r   r   r   r   r   r-     s   
r-   )
__future__r   r   rl   r   rr   collectionsr   	functoolsr   distutils.errorsr   r   Zsetuptools.py26compatr   Zsetuptools.extern.sixr	   r    r   r   objectr1   r*   r-   r   r   r   r   <module>   s   . 9