o
    5‘ðiGh  ã                   @  s  U d Z ddl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mZ ddlmZmZmZmZmZmZmZ dd	lmZ dd
lmZmZ ddlmZm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) er�ddl*m+Z+ ddl,m-Z- ddl.m/Z/ e0e1e2e1ef f Z3de4d< 	 e0e1e3f Z5de4d< 	 edddƒZ6	dMdNd$d%„Z7dOd'd(„Z8	)	dPdQd-d.„Z9dRd3d4„Z:dSd7d8„Z;	dTdUd;d<„Z<dVdAdB„Z=G dCdD„ dDee6 ƒZ>G dEdF„ dFe>d ƒZ?G dGdH„ dHe>d ƒZ@G dIdJ„ dJe(ƒZAG dKdL„ dLe(ƒZBdS )Wa<  
Load setuptools configuration from ``setup.cfg`` files.

**API will be made private in the future**

To read project metadata, consider using
``build.util.project_wheel_metadata`` (https://pypi.org/project/build/).
For simple scenarios, you can also try parsing the file directly
with the help of ``configparser``.
é    )ÚannotationsN)Úabstractmethod)Údefaultdict)ÚIterableÚIterator)ÚpartialÚwraps)ÚTYPE_CHECKINGÚAnyÚCallableÚClassVarÚGenericÚTypeVarÚcast)Údefault_environment)ÚInvalidRequirementÚRequirement)ÚInvalidVersionÚVersioné   )Ú_static)ÚStrPath)Ú	FileErrorÚOptionError)ÚSetuptoolsDeprecationWarningé   )Úexpand)Ú	TypeAlias©ÚDistribution)ÚDistributionMetadatar   ÚSingleCommandOptionsÚAllCommandOptionsÚTargetr   r    FÚfilepathr   Úfind_othersÚboolÚignore_option_errorsÚreturnÚdictc                 C  s8   ddl m} |ƒ }|r| ¡ ng }t|| ||ƒ}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   r   )Úsetuptools.distr   Úfind_config_filesÚ_applyÚconfiguration_to_dict)r$   r%   r'   r   ÚdistÚ	filenamesÚhandlers© r1   úY/root/parts/websockify/install/lib/python3.10/site-packages/setuptools/config/setupcfg.pyÚread_configuration3   s
   r3   r.   c                 C  s   t | |ƒ |  ¡  | S )z`Apply the configuration from a ``setup.cfg`` file into an existing
    distribution object.
    )r,   Ú_finalize_requires)r.   r$   r1   r1   r2   Úapply_configurationM   s   
r5   r1   Úother_filesúIterable[StrPath]ú2tuple[ConfigMetadataHandler, ConfigOptionsHandler]c              	   C  s¨   ddl m} tj |¡}tj |¡std|› d�ƒ‚t ¡ }t tj 	|¡¡ g |¢|‘}z |j
| ttt |ƒd� t| | j|d�}|  ¡  W t |¡ |S t |¡ w )zHRead configuration from ``filepath`` and applies to the ``dist`` object.r   )Ú_DistributionzConfiguration file z does not exist.)r/   )r'   )r*   r9   ÚosÚpathÚabspathÚisfiler   ÚgetcwdÚchdirÚdirnameÚparse_config_filesr   ÚlistÚstrÚparse_configurationÚcommand_optionsÚ_finalize_license_files)r.   r$   r6   r'   r9   Úcurrent_directoryr/   r0   r1   r1   r2   r,   V   s    ÿ

þr,   Ú
target_objú#Distribution | DistributionMetadataÚkeyrC   c                 C  s*   d|› �}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.
    Úget_)Ú	functoolsr   Úgetattr)rH   rJ   Úgetter_nameÚby_attributeÚgetterr1   r1   r2   Ú_get_optionu   s   
rQ   r0   úKIterable[ConfigHandler[Distribution] | ConfigHandler[DistributionMetadata]]c                 C  s<   t tƒ}| D ]}|jD ]}t|j|ƒ}|||j |< qq|S )z¿Returns configuration data gathered by given handlers as a dict.

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

    :rtype: dict
    )r   r)   Úset_optionsrQ   rH   Úsection_prefix)r0   Úconfig_dictÚhandlerÚoptionÚvaluer1   r1   r2   r-   �   s   
þr-   ÚdistributionrE   c                 C  sŽ   t  | ¡�6}t| |||ƒ}| ¡  | js|j| _t| j|||| j| jƒ}| ¡  | j 	|j|j¡ W d  ƒ ||fS 1 s>w   Y  ||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
    N)
r   ÚEnsurePackagesDiscoveredÚConfigOptionsHandlerÚparseÚpackage_dirÚConfigMetadataHandlerÚmetadataÚsrc_rootÚ_referenced_filesÚupdate)rY   rE   r'   Úensure_discoveredÚoptionsÚmetar1   r1   r2   rD   —   s4   üúÿ
ëçrD   ÚlabelÚ
orig_valueÚparsedrB   c              
     s°   d|v s
t ˆ ƒdkrdS tƒ  ¡ }ztˆ d ƒ}|j|v r)tj| ˆ d d� W dS W dS  tyW } z t‡ fdd„|D ƒƒrLtj	| ˆ d d�}t|ƒ|‚W Y d}~dS d}~ww )am  Because users sometimes misinterpret this configuration:

    [options.extras_require]
    foo = bar;python_version<"4"

    It looks like one requirement with an environment marker
    but because there is no newline, it's parsed as two requirements
    with a semicolon as separator.

    Therefore, if:
        * input string does not contain a newline AND
        * parsed result contains two requirements AND
        * parsing of the two parts from the result ("<first>;<second>")
        leads in a valid Requirement with a valid marker
    a UserWarning is shown to inform the user about the possible problem.
    Ú
r   Nr   )ÚfieldÚreqc                 3  s   � | ]
}ˆ d    |¡V  qdS )r   N©Ú
startswith)Ú.0Úmarker©rh   r1   r2   Ú	<genexpr>à   ó   € z8_warn_accidental_env_marker_misconfig.<locals>.<genexpr>)
ÚlenÚ
marker_envÚkeysr   ÚnameÚ_AmbiguousMarkerÚemitr   ÚanyÚmessage)rf   rg   rh   Úmarkersrk   ÚexÚmsgr1   rp   r2   Ú%_warn_accidental_env_marker_misconfigÅ   s   

ÿ
þ€ÿr~   c                   @  sæ   e Zd ZU dZded< 	 i Zded< 	 d5dd„Zed6dd„ƒZe	e
d7dd„ƒƒZd8dd„Zed9dd„ƒZedd„ ƒZedd„ ƒZedd „ ƒZd:d#d$„Zd;d&d'„Zed(d)„ ƒZed*d+„ ƒZed<d-d.„ƒZd8d/d0„Zd8d1d2„Zd3d4„ Zd,S )=ÚConfigHandlerz1Handles metadata supplied in configuration files.rC   rT   zClassVar[dict[str, str]]ÚaliasesrH   r#   rd   r"   rc   úexpand.EnsurePackagesDiscoveredr(   ÚNonec                 C  s8   || _ || _t|  |¡ƒ| _g | _|| _tt ƒ | _	d S ©N)
r'   rH   r)   Ú_section_optionsÚsectionsrS   rc   ÚsetrC   ra   ©ÚselfrH   rd   r'   rc   r1   r1   r2   Ú__init__õ   s   zConfigHandler.__init__ú*Iterator[tuple[str, SingleCommandOptions]]c                 c  s@   � |  ¡ D ]\}}| | j¡\}}}|rq| d¡|fV  qd S )NÚ.)ÚitemsÚ	partitionrT   Úlstrip)Úclsrd   Ú	full_namerX   ÚpreÚ_seprv   r1   r1   r2   r„     s   €üzConfigHandler._section_optionsúdict[str, Callable]c                 C  s   t | jj› d�ƒ‚)ú.Metadata item name to parser function mapping.z must provide .parsers property)ÚNotImplementedErrorÚ	__class__Ú__name__©rˆ   r1   r1   r2   Úparsers  s   ÿzConfigHandler.parsersc           	   
   C  s¾   | j }| j ||¡}zt||ƒ}W n ty" } zt|ƒ|‚d }~ww |r'd S z| j |dd„ ¡|ƒ}W n tf| j yB   Y d S w t	 
|j|¡}t|d|› �|ƒ}||ƒ | j |¡ d S )Nc                 S  s   | S rƒ   r1   )Úxr1   r1   r2   Ú<lambda>(  ó    z+ConfigHandler.__setitem__.<locals>.<lambda>Úset_)rH   r€   ÚgetrM   ÚAttributeErrorÚKeyErrorr™   Ú	Exceptionr'   rL   r   Ú__setattr__rS   Úappend)	rˆ   Úoption_namerX   rH   Úcurrent_valueÚerh   Úsimple_setterÚsetterr1   r1   r2   Ú__setitem__  s&   
€ÿÿzConfigHandler.__setitem__ú,c                 C  s8   t |tƒr|S d|v r| ¡ }n| |¡}dd„ |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
        ri   c                 S  s   g | ]
}|  ¡ r|  ¡ ‘qS r1   ©Ústrip)rn   Úchunkr1   r1   r2   Ú
<listcomp>D  s    z-ConfigHandler._parse_list.<locals>.<listcomp>)Ú
isinstancerB   Ú
splitlinesÚsplit)r�   rX   Ú	separatorr1   r1   r2   Ú_parse_list2  s   



zConfigHandler._parse_listc                 C  sR   d}i }|   |¡D ]}| |¡\}}}||krtd|› �ƒ‚| ¡ || ¡ < q	|S )zPRepresents value as a dict.

        :param value:
        :rtype: dict
        ú=z&Unable to parse option value to dict: )r³   r�   r   r¬   )r�   rX   r²   ÚresultÚlinerJ   ÚsepÚvalr1   r1   r2   Ú_parse_dictF  s   zConfigHandler._parse_dictc                 C  s   |  ¡ }|dv S )zQRepresents value as boolean.

        :param value:
        :rtype: bool
        )Ú1ÚtrueÚyes)Úlower©r�   rX   r1   r1   r2   Ú_parse_boolW  s   zConfigHandler._parse_boolc                   ó   ‡ fdd„}|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
        c                   s(   d}|   |¡rtdˆ › d�ƒ‚t | ¡S )Núfile:z"Only strings are accepted for the z field, files are not accepted)rm   Ú
ValueErrorr   ÚStr)rX   Úexclude_directive©rJ   r1   r2   Úparserm  s   

ÿ
z3ConfigHandler._exclude_files_parser.<locals>.parserr1   )r�   rJ   rÆ   r1   rÅ   r2   Ú_exclude_files_parsera  s   	z#ConfigHandler._exclude_files_parserÚroot_dirúStrPath | Nonec                 C  sh   d}t |tƒs	|S | |¡st |¡S |t|ƒd… }dd„ | d¡D ƒ}| j |¡ t t	 
||¡¡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
        rÁ   Nc                 S  s   g | ]}|  ¡ ‘qS r1   r«   )rn   r;   r1   r1   r2   r®   Ž  ó    z-ConfigHandler._parse_file.<locals>.<listcomp>rª   )r¯   rC   rm   r   rÃ   rs   r±   ra   rb   r   Ú
read_files)rˆ   rX   rÈ   Úinclude_directiveÚspecÚ	filepathsr1   r1   r2   Ú_parse_filex  s   


zConfigHandler._parse_filer   c                 C  s@   d}|  |¡st |¡S | |d¡}| | jj¡ t |||¡S )z·Represents value as a module attribute.

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

        :param str value:
        :rtype: str
        zattr:Ú )	rm   r   rÃ   Úreplacerb   rc   r]   r   Ú	read_attr)rˆ   rX   r]   rÈ   Úattr_directiveÚ	attr_descr1   r1   r2   Ú_parse_attr“  s   


zConfigHandler._parse_attrc                   rÀ   )z¹Returns parser function to represents value as a list.

        Parses a value applying given methods one after another.

        :param parse_methods:
        :rtype: callable
        c                   s   | }ˆ D ]}||ƒ}q|S rƒ   r1   )rX   rh   Úmethod©Úparse_methodsr1   r2   r\   ±  s   
z1ConfigHandler._get_parser_compound.<locals>.parser1   )r�   rØ   r\   r1   r×   r2   Ú_get_parser_compound§  s   
z"ConfigHandler._get_parser_compoundc                 C  s,   i }|  ¡ D ]\}\}}|||ƒ||< q|S )a  Parses section options into a dictionary.

        Applies a given parser to each option in a section.

        :param dict section_options:
        :param callable values_parser: function with 2 args corresponding to key, value
        :rtype: dict
        )rŒ   )r�   Úsection_optionsÚvalues_parserrX   rJ   Ú_r¸   r1   r1   r2   Ú_parse_section_to_dict_with_key»  s   
z-ConfigHandler._parse_section_to_dict_with_keyNc                   s$   ˆ r‡ fdd„ndd„ }|   ||¡S )a   Parses section options into a dictionary.

        Optionally applies a given parser to each value.

        :param dict section_options:
        :param callable values_parser: function with 1 arg corresponding to option value
        :rtype: dict
        c                   s   ˆ |ƒS rƒ   r1   ©rÜ   Úv©rÛ   r1   r2   r›   Ô  s    z6ConfigHandler._parse_section_to_dict.<locals>.<lambda>c                 S  s   |S rƒ   r1   rÞ   r1   r1   r2   r›   Ô  rœ   )rÝ   )r�   rÚ   rÛ   rÆ   r1   rà   r2   Ú_parse_section_to_dictÊ  s   
z$ConfigHandler._parse_section_to_dictc              	   C  sL   |  ¡ D ]\}\}}t t¡� || |< W d  ƒ n1 sw   Y  qdS )zQParses configuration file section.

        :param dict section_options:
        N)rŒ   Ú
contextlibÚsuppressr    )rˆ   rÚ   rv   rÜ   rX   r1   r1   r2   Úparse_section×  s   
þ€ÿzConfigHandler.parse_sectionc                 C  sl   | j  ¡ D ].\}}d}|rd|› �}t| d|› � dd¡dƒ}|du r/td| j› d|› d�ƒ‚||ƒ qdS )	zTParses configuration file items from one
        or more related sections.

        rÐ   rÜ   rä   r‹   Ú__Nz*Unsupported distribution option section: [ú])r…   rŒ   rM   rÑ   r   rT   )rˆ   Úsection_namerÚ   Úmethod_postfixÚsection_parser_methodr1   r1   r2   r\   á  s&   
üÿÿÿ
îzConfigHandler.parsec                   s   t ˆ ƒ‡ ‡‡fdd„ƒ}|S )z¢this function will wrap around parameters that are deprecated

        :param msg: deprecation message
        :param func: function to be wrapped around
        c                    s.   ˆ  dd¡ tjdˆfi ˆ¤Ž ˆ | i |¤ŽS )NÚ
stacklevelr   z Deprecated config in `setup.cfg`)Ú
setdefaultÚ_DeprecatedConfigrx   )ÚargsÚkwargs©ÚfuncÚkwr}   r1   r2   Úconfig_handler  s   z@ConfigHandler._deprecated_config_handler.<locals>.config_handler)r   )rˆ   rð   r}   rñ   rò   r1   rï   r2   Ú_deprecated_config_handlerú  s   z(ConfigHandler._deprecated_config_handler)rH   r#   rd   r"   rc   r�   r(   r‚   )rd   r"   r(   rŠ   ©r(   r“   ©r(   r‚   )rª   )rÈ   rÉ   )rÈ   r   rƒ   )r—   Ú
__module__Ú__qualname__Ú__doc__Ú__annotations__r€   r‰   Úclassmethodr„   Úpropertyr   r™   r©   r³   r¹   r¿   rÇ   rÏ   rÕ   rÙ   rÝ   rá   rä   r\   ró   r1   r1   r1   r2   r   å   s@   
 
	


	







r   c                      sT   e Zd ZdZdddddœZdZ	 dejfd‡ fdd„Ze	ddd„ƒZ
dd„ Z‡  ZS ) r^   r_   ÚurlÚdescriptionÚclassifiersÚ	platforms)Ú	home_pageÚsummaryÚ
classifierÚplatformFNrH   r    rd   r"   r'   r&   rc   r�   r]   údict | NonerÈ   rÉ   r(   r‚   c                   s"   t ƒ  ||||¡ || _|| _d S rƒ   )Úsuperr‰   r]   rÈ   )rˆ   rH   rd   r'   rc   r]   rÈ   ©r–   r1   r2   r‰     s   	
zConfigMetadataHandler.__init__r“   c                 C  sº   |   | jtj¡}|   | jtj¡}t| j| jd�}| j	}i dtj
“dtj
“dtj
“dtj
“d|“d|“d|“d	|“d
|   ||¡“d|dƒ“d|“d|“d|“dtj
“d| j“dtj
“d|“S )r”   ©rÈ   ÚauthorÚauthor_emailÚ
maintainerÚmaintainer_emailrÿ   ÚkeywordsÚprovidesÚ	obsoletesrþ   ÚlicenseÚlicense_filesrý   Úlong_descriptionÚlong_description_content_typeÚversionrü   Úproject_urls)rÙ   r³   r   ÚListr¹   ÚDictr   rÏ   rÈ   rÇ   rÃ   Ú_parse_version)rˆ   Úparse_list_staticÚparse_dict_staticÚ
parse_fileÚexclude_files_parserr1   r1   r2   r™   '  sN   ÿþýüûúùø	÷
öõôóòñðïzConfigMetadataHandler.parsersc              
   C  st   |   || j¡}||kr.| ¡ }zt|ƒ W |S  ty- } ztd|› d|› �ƒ|‚d}~ww t |  || j	| j¡¡S )zSParses `version` option value.

        :param value:
        :rtype: str

        zVersion loaded from z does not comply with PEP 440: N)
rÏ   rÈ   r¬   r   r   r   r   r  rÕ   r]   )rˆ   rX   r  r¦   r1   r1   r2   r  C  s"   
úÿÿý€ÿz$ConfigMetadataHandler._parse_version)rH   r    rd   r"   r'   r&   rc   r�   r]   r  rÈ   rÉ   r(   r‚   rô   )r—   rö   r÷   rT   r€   Ústrict_moder:   Úcurdirr‰   rû   r™   r  Ú__classcell__r1   r1   r  r2   r^   
  s    üùr^   c                      s    e Zd ZdZd+‡ fdd„Zedd„ ƒZdd„ Zd,dd„Ze	d-dd„ƒZ
dd„ Zdd„ Zdd„ Zd.dd „Zd!d"„ Zd.d#d$„Zd.d%d&„Zd.d'd(„Zd.d)d*„Z‡  ZS )/r[   rd   rH   r   r"   r'   r&   rc   r�   r(   r‚   c                   s$   t ƒ  ||||¡ |j| _i | _d S rƒ   )r  r‰   r`   rÈ   r]   r‡   r  r1   r2   r‰   `  s   
zConfigOptionsHandler.__init__c                 C  s   | j |dd�S )Nú;)r²   )r³   r¾   r1   r1   r2   Ú_parse_list_semicolonk  s   z*ConfigOptionsHandler._parse_list_semicolonc                 C  s   | j || jd�S )Nr  )rÏ   rÈ   )rˆ   rX   r1   r1   r2   Ú_parse_file_in_rooto  s   z(ConfigOptionsHandler._parse_file_in_rootrf   rC   rX   c                 C  s0   |   |  |¡¡}t|||ƒ t dd„ |D ƒ¡S )Nc                 s  s   � | ]
}|  d ¡s|V  qdS )ú#Nrl   )rn   r¶   r1   r1   r2   rq   x  rr   z@ConfigOptionsHandler._parse_requirements_list.<locals>.<genexpr>)r   r!  r~   r   r  )rˆ   rf   rX   rh   r1   r1   r2   Ú_parse_requirements_listr  s   z-ConfigOptionsHandler._parse_requirements_listr“   c                 C  sN   | j }| j}| j}||| j||||  |d¡t| jdƒ| j| j| j	|t
j|dœS )r”   zeThe namespace_packages parameter is deprecated, consider using implicit namespaces instead (PEP 420).Úinstall_requires)Úzip_safeÚinclude_package_datar]   ÚscriptsÚeager_resourcesÚdependency_linksÚnamespace_packagesr$  Úsetup_requiresÚpackagesÚentry_pointsÚ
py_modulesÚpython_requiresÚcmdclass)r³   r¿   Ú_parse_cmdclassr¹   ró   r   r#  r   Ú_parse_packagesr!  r   ÚSpecifierSet)rˆ   Ú
parse_listÚ
parse_boolÚparse_cmdclassr1   r1   r2   r™   {  s.   þÿëzConfigOptionsHandler.parsersc                 C  s   | j j}t |  |¡|| j¡S rƒ   )rc   r]   r   r0  r¹   rÈ   )rˆ   rX   r]   r1   r1   r2   r1  š  s   z$ConfigOptionsHandler._parse_cmdclassc                 C  sb   ddg}|  ¡ }||vr|  |¡S |  | j di ¡¡}|j||d k| j| jd� tj	di |¤ŽS )zTParses `packages` option value.

        :param value:
        :rtype: list
        zfind:zfind_namespace:zpackages.findr   )Ú
namespacesrÈ   Úfill_package_dirNr1   )
r¬   r³   Úparse_section_packages__findr…   rž   rb   rÈ   r]   r   Úfind_packages)rˆ   rX   Úfind_directivesÚtrimmed_valueÚfind_kwargsr1   r1   r2   r2  ž  s   
ÿ
ýz$ConfigOptionsHandler._parse_packagesc                   sN   |   || j¡}g d¢‰ ‡ fdd„| ¡ D ƒ}| d¡}|dur%|d |d< |S )zœParses `packages.find` configuration file section.

        To be used in conjunction with _parse_packages().

        :param dict section_options:
        )ÚwhereÚincludeÚexcludec                   s"   i | ]\}}|ˆ v r|r||“qS r1   r1   )rn   Úkrß   ©Ú
valid_keysr1   r2   Ú
<dictcomp>Á  s   " zEConfigOptionsHandler.parse_section_packages__find.<locals>.<dictcomp>r>  Nr   )rá   r³   rŒ   rž   )rˆ   rÚ   Úsection_datar=  r>  r1   rB  r2   r9  ·  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ˆ   rÚ   rh   r1   r1   r2   Úparse_section_entry_pointsÉ  s   z/ConfigOptionsHandler.parse_section_entry_pointsc                 C  s   |   || j¡}t |¡S rƒ   )rá   r³   r   Úcanonic_package_data)rˆ   rÚ   Úpackage_datar1   r1   r2   Ú_parse_package_dataÑ  s   
z(ConfigOptionsHandler._parse_package_datac                 C  ó   |   |¡| d< dS )z`Parses `package_data` configuration file section.

        :param dict section_options:
        rI  N©rJ  ©rˆ   rÚ   r1   r1   r2   Úparse_section_package_dataÕ  ó   z/ConfigOptionsHandler.parse_section_package_datac                 C  rK  )zhParses `exclude_package_data` configuration file section.

        :param dict section_options:
        Úexclude_package_dataNrL  rM  r1   r1   r2   Ú"parse_section_exclude_package_dataÜ  rO  z7ConfigOptionsHandler.parse_section_exclude_package_datac                   s&   ˆ   |‡ fdd„¡}t |¡ˆ d< dS )zbParses `extras_require` configuration file section.

        :param dict section_options:
        c                   s   ˆ   d| › d�|¡S )Nzextras_require[ræ   )r#  )rA  rß   r˜   r1   r2   r›   ê  rÊ   zCConfigOptionsHandler.parse_section_extras_require.<locals>.<lambda>Úextras_requireN)rÝ   r   r  rF  r1   r˜   r2   Úparse_section_extras_requireã  s
   
þz1ConfigOptionsHandler.parse_section_extras_requirec                 C  s$   |   || j¡}t || j¡| d< dS )z^Parses `data_files` configuration file section.

        :param dict section_options:
        Ú
data_filesN)rá   r³   r   Úcanonic_data_filesrÈ   rF  r1   r1   r2   Úparse_section_data_filesð  s   z-ConfigOptionsHandler.parse_section_data_files)
rH   r   rd   r"   r'   r&   rc   r�   r(   r‚   )rf   rC   rX   rC   rô   rõ   )r—   rö   r÷   rT   r‰   rú   r   r!  r#  rû   r™   r1  r2  r9  rG  rJ  rN  rQ  rS  rV  r  r1   r1   r  r2   r[   ]  s$    

	



r[   c                   @  s$   e Zd ZdZdZdZedd„ ƒZdS )rw   zAmbiguous requirement marker.zá
    One of the parsed requirements in `{field}` looks like a valid environment marker:

        {req!r}

    Please make sure that the configuration file is correct.
    You can use dangling lines to avoid this problem.
    z'userguide/declarative_config.html#opt-2c                 K  s"   d| j › �}| j| j| j||d�S )Nz%https://setuptools.pypa.io/en/latest/)Úsee_urlÚformat_args)Ú	_SEE_DOCSÚ_formatÚ_SUMMARYÚ_DETAILS)r�   rñ   Údocsr1   r1   r2   rz     s   z_AmbiguousMarker.messageN)r—   rö   r÷   r[  r\  rY  rú   rz   r1   r1   r1   r2   rw   ù  s    rw   c                   @  s   e Zd ZdZdS )rì   z!userguide/declarative_config.htmlN)r—   rö   r÷   rY  r1   r1   r1   r2   rì     s    rì   )FF)r$   r   r%   r&   r'   r&   r(   r)   )r.   r   r$   r   r(   r   )r1   F)
r.   r   r$   r   r6   r7   r'   r&   r(   r8   )rH   rI   rJ   rC   )r0   rR   r(   r)   )F)rY   r   rE   r"   r'   r&   r(   r8   )rf   rC   rg   rC   rh   rB   )Crø   Ú
__future__r   râ   rL   r:   Úabcr   Úcollectionsr   Úcollections.abcr   r   r   r   Útypingr	   r
   r   r   r   r   r   Úpackaging.markersr   rt   Úpackaging.requirementsr   r   Úpackaging.versionr   r   rÐ   r   Ú_pathr   Úerrorsr   r   Úwarningsr   r   Útyping_extensionsr   r*   r   Údistutils.distr    r)   rC   Útupler!   rù   r"   r#   r3   r5   r,   rQ   r-   rD   r~   r   r^   r[   rw   rì   r1   r1   r1   r2   Ú<module>   s\    $ÿ
ü

ý
.   'S 