Your IP : 3.145.125.181


Current Path : /opt/alt/python313/lib64/python3.13/importlib/metadata/__pycache__/
Upload File :
Current File : //opt/alt/python313/lib64/python3.13/importlib/metadata/__pycache__/__init__.cpython-313.pyc

�

+}g+���2�SSKJr SSKrSSKrSSKrSSKrSSKrSSKrSSKrSSK	r	SSK
r
SSKrSSKrSSK
r
SSKrSSKrSSKrSSKrSSKrSSKJr SSKJrJr SSKJrJr SSKJrJr SSKJrJr SS	K J!r! SS
K"J#r# SSK$J%r% SSKJ&r& SS
K'J(r(J)r)J*r*J+r+J,r,J-r-J.r.J/r/ /SQr0"SS\15r2"SS5r3"SS5r4"SS\55r6"SS\
Rn5r8"SS5r9"SS5r:"SS\:5r;"SS \%5r<"S!S"5r="S#S$5r>"S%S&5r?"S'S(\<5r@"S)S*\;5rAS9S+jrBS:S,jrCS;S-jrDS<S.jrE\R�"\\R�"S/5S09rHS=S1jrIS>S2jrJS?S3jrKS@S4jrLS5rMSAS6jrNSBS7jrOS8rPg)C�)�annotationsN�)�_meta)�FreezableDefaultDict�Pair)�method_cache�	pass_none)�always_iterable�unique_everseen)�PackageMetadata�
SimplePath)�suppress)�
import_module)�MetaPathFinder)�starmap)�Any�Iterable�List�Mapping�Match�Optional�Set�cast)�Distribution�DistributionFinderr�PackageNotFoundError�distribution�
distributions�entry_points�files�metadata�packages_distributions�requires�versionc�6�\rSrSrSrSSjr\SSj5rSrg)r�1zThe package was not found.c� �SUR3$)Nz"No package metadata was found for ��name��selfs �B/opt/alt/python313/lib64/python3.13/importlib/metadata/__init__.py�__str__�PackageNotFoundError.__str__4s��3�D�I�I�;�?�?�c�"�URunU$�N)�args�r+r)s  r,r)�PackageNotFoundError.name7s���)�)����r/�N��return�str)	�__name__�
__module__�__qualname__�__firstlineno__�__doc__r-�propertyr)�__static_attributes__r5r/r,rr1s��$�@����r/rc��\rSrSrSr\R"S5R5r\	S5r
\S	Sj5r\S
Sj5r
Srg)�	Sectioned�=a8
A simple entry point config parser for performance

>>> for item in Sectioned.read(Sectioned._sample):
...     print(item)
Pair(name='sec1', value='# comments ignored')
Pair(name='sec1', value='a = 1')
Pair(name='sec1', value='b = 2')
Pair(name='sec2', value='a = 2')

>>> res = Sectioned.section_pairs(Sectioned._sample)
>>> item = next(res)
>>> item.name
'sec1'
>>> item.value
Pair(name='a', value='1')
>>> item = next(res)
>>> item.value
Pair(name='b', value='2')
>>> item = next(res)
>>> item.name
'sec2'
>>> item.value
Pair(name='a', value='2')
>>> list(res)
[]
zm
        [sec1]
        # comments ignored
        a = 1
        b = 2

        [sec2]
        a = 2
        c�B�SURXRS95$)Nc3�# �UHAnURcMUR[R"UR5S9v� MC g7f)N)�value)r)�_replacer�parserE)�.0�sections  r,�	<genexpr>�*Sectioned.section_pairs.<locals>.<genexpr>hs;���
�<���|�|�
>�G���4�:�:�g�m�m�#<��=�<�s
�A�4A)�filter_)�read�valid)�cls�texts  r,�
section_pairs�Sectioned.section_pairsfs#��
��8�8�D�)�)�8�<�
�	
r/Nc#�&# �[U[[RUR	555nSnUHSnURS5=(a UR
S5nU(aURS5nMF[X45v� MU g7f)N�[�]z[])�filter�mapr8�strip�
splitlines�
startswith�endswithr)rPrL�linesr)rE�
section_matchs      r,rM�Sectioned.readnso����w��C�I�I�t���/@� A�B�����E�!�,�,�S�1�I�e�n�n�S�6I�M���{�{�4�(����t�#�#��s�BBc�@�U=(a URS5(+$)N�#)rZ)�lines r,rN�Sectioned.validys���0�D�O�O�C�0�0�0r/r5r1)rar8)r9r:r;r<r=�textwrap�dedent�lstrip�_sample�classmethodrQ�staticmethodrMrNr?r5r/r,rArA=sd���8�o�o�	�
�
�f�h���
��
��$��$��1��1r/rAc���\rSrSr%Sr\R"S5rS\S'S\S'S\S'Sr	S	\S
'SSjr
SSjr\SS
j5r
\SSj5r\SSj5rSrSrSrSrSrSrSrSSjrSrg)�
EntryPoint�~apAn entry point as defined by Python packaging conventions.

See `the packaging docs on entry points
<https://packaging.python.org/specifications/entry-points/>`_
for more information.

>>> ep = EntryPoint(
...     name=None, group=None, value='package.module:attr [extra1, extra2]')
>>> ep.module
'package.module'
>>> ep.attr
'attr'
>>> ep.extras
['extra1', 'extra2']
zH(?P<module>[\w.]+)\s*(:\s*(?P<attr>[\w.]+)\s*)?((?P<extras>\[.*\])\s*)?$r8r)rE�groupNzOptional[Distribution]�distc�6�[U5RXUS9 g)N�r)rErl��vars�update)r+r)rErls    r,�__init__�EntryPoint.__init__�s���T�
���t���>r/c�8�[[URRUR55n[UR
S55n[SUR
S5=(d SRS55n[R"[X25$)z�Load the entry point from its definition. If only a module
is indicated by the value, return that module. Otherwise,
return the named object.
�moduleN�attr��.)rr�pattern�matchrErrlrV�split�	functools�reduce�getattr)r+r{rv�attrss    r,�load�EntryPoint.load�sn��
�U�D�L�L�.�.�t�z�z�:�;���u�{�{�8�4�5���t�e�k�k�&�1�7�R�>�>�s�C�D�������7�7r/c�x�URRUR5nUceURS5$)Nrv�rzr{rErl�r+r{s  r,rv�EntryPoint.module�s5�����"�"�4�:�:�.��� � � ��{�{�8�$�$r/c�x�URRUR5nUceURS5$)Nrwr�r�s  r,rw�EntryPoint.attr�s5�����"�"�4�:�:�.��� � � ��{�{�6�"�"r/c��URRUR5nUce[R"SURS5=(d S5$)Nz\w+�extrasrx)rzr{rE�re�findallrlr�s  r,r��EntryPoint.extras�sE�����"�"�4�:�:�.��� � � ��z�z�&�%�+�+�h�"7�"=�2�>�>r/c�6�[U5RUS9 U$)N�rmrp)r+rms  r,�_for�EntryPoint._for�s���T�
���t��$��r/c�^�U4SjU5n[[[RUR	5U55$)a�
EntryPoint matches the given parameters.

>>> ep = EntryPoint(group='foo', name='bar', value='bing:bong [extra1, extra2]')
>>> ep.matches(group='foo')
True
>>> ep.matches(name='bar', value='bing:bong [extra1, extra2]')
True
>>> ep.matches(group='foo', name='other')
False
>>> ep.matches()
True
>>> ep.matches(extras=['extra1', 'extra2'])
True
>>> ep.matches(module='bing')
True
>>> ep.matches(attr='bong')
True
c3�<># �UHn[TU5v� M g7fr1�r)rH�paramr+s  �r,rJ�%EntryPoint.matches.<locals>.<genexpr>�s����:�6�%���u�%�%�6�s�)�allrW�operator�eq�values)r+�paramsr�s`  r,�matches�EntryPoint.matches�s-���(;�6�:���3�x�{�{�F�M�M�O�U�;�<�<r/c�H�URURUR4$r1ror*s r,�_key�EntryPoint._key�s���y�y�$�*�*�d�j�j�0�0r/c�D�UR5UR5:$r1�r��r+�others  r,�__lt__�EntryPoint.__lt__�s���y�y�{�U�Z�Z�\�)�)r/c�D�UR5UR5:H$r1r�r�s  r,�__eq__�EntryPoint.__eq__�s���y�y�{�e�j�j�l�*�*r/c��[S5e)Nz!EntryPoint objects are immutable.)�AttributeError)r+r)rEs   r,�__setattr__�EntryPoint.__setattr__�s���@�A�Ar/c�\�SUR<SUR<SUR<S3$)NzEntryPoint(name=z, value=z, group=�)ror*s r,�__repr__�EntryPoint.__repr__�s2���t�y�y�m�8�D�J�J�>�B��Z�Z�N�!�
%�	
r/c�4�[UR55$r1)�hashr�r*s r,�__hash__�EntryPoint.__hash__�s���D�I�I�K� � r/r5)r)r8rEr8rlr8r7�None)r7rr6�r7z	List[str])r7�int)r9r:r;r<r=r��compilerz�__annotations__rmrsr�r>rvrwr�r�r�r�r�r�r�r�r�r?r5r/r,rjrj~s���� �j�j�	%��G�
� �I��J��J�#'�D�
 �'�?�8��%��%�
�#��#�
�?��?�
�=�.1�*�+�B�
�!r/rjc�~�\rSrSrSrSrSSjrSrS
Sjr\	SSj5r
\	SSj5r\S	5r
\S
5rSrg)�EntryPoints�z;
An immutable collection of selectable EntryPoint objects.
r5c�x�[[URUS955$![a [	U5ef=f)z+
Get the EntryPoint in self matching name.
r()�next�iter�select�
StopIteration�KeyErrorr3s  r,�__getitem__�EntryPoints.__getitem__s;��	!���T�[�[�d�[�3�4�5�5���	!��4�.� �	!�s� #�9c�P�URR<S[U5<S3$)zb
Repr with classname and tuple constructor to
signal that we deviate from regular tuple behavior.
�(r�)�	__class__r9�tupler*s r,r��EntryPoints.__repr__
s��
 �>�>�2�2�E�$�K�@�@r/c�.^�[U4SjU55$)z^
Select entry points from self that match the
given parameters (typically group and/or name).
c3�X># �UHoR"S0TD6(dMUv� M! g7f�Nr5)r�)rH�epr�s  �r,rJ�%EntryPoints.select.<locals>.<genexpr>s����E��"�
�
�0D�V�0D�2�2��s�*�	*)r�)r+r�s `r,r��EntryPoints.selects���
�E��E�E�Er/c�D�UVs1sHoRiM sn$s snf)z2
Return the set of all names of all entry points.
r(�r+r�s  r,�names�EntryPoints.namess��
#'�'�$�B���$�'�'��'��c�D�UVs1sHoRiM sn$s snf)z3
Return the set of all groups of all entry points.
)rlr�s  r,�groups�EntryPoints.groupss��
$(�(�4�R���4�(�(��(r�c�F^�U"U4SjURU555$)Nc3�D># �UHoRT5v� M g7fr1)r�)rHr�rms  �r,rJ�-EntryPoints._from_text_for.<locals>.<genexpr>(s����@�+?�R�7�7�4�=�=�+?��� )�
_from_text)rOrPrms  `r,�_from_text_for�EntryPoints._from_text_for&s����@�3�>�>�$�+?�@�@�@r/c�L�S[RU=(d S55$)Nc3�# �UHBn[URRURRURS9v� MD g7f)roN)rjrEr))rH�items  r,rJ�)EntryPoints._from_text.<locals>.<genexpr>,s6���
�;��
�D�J�J�O�O�4�:�:�3C�3C�4�9�9�U�;�s�A
Arx)rArQ)rPs r,r��EntryPoints._from_text*s#��
�!�/�/��
��;�
�	
r/N)r)r8r7rj�r7r�)r7zSet[str])r9r:r;r<r=�	__slots__r�r�r�r>r�r�rgr�rhr�r?r5r/r,r�r��sq����I�!�A�F��(��(��)��)��A��A��
��
r/r�c�Z�\rSrSr%SrS\S'S\S'S\S'SSS	jjrSS
jrSSjrSr	g
)�PackagePathi2z"A reference to a path in a packagezOptional[FileHash]r�r��sizerrmc�<�UR5RUS9$)N��encoding)�locate�	read_text)r+r�s  r,r��PackagePath.read_text9s���{�{�}�&�&��&�9�9r/c�>�UR5R5$r1)r��
read_bytesr*s r,�read_binary�PackagePath.read_binary<s���{�{�}�'�'�)�)r/c�8�URRU5$)z'Return a path-like object for this path)rm�locate_filer*s r,r��PackagePath.locate?s���y�y�$�$�T�*�*r/r5N)�utf-8)r�r8r7r8)r7�bytes)r7r
)
r9r:r;r<r=r�r�r�r�r?r5r/r,r�r�2s%��,�
��

�I�
��:�*�+r/r�c�(�\rSrSrSSjrSSjrSrg)�FileHashiDc�@�URS5uUlo lg)N�=)�	partition�moderE)r+�spec�_s   r,rs�FileHash.__init__Es��#'�>�>�#�#6� ��	�1�jr/c�<�SURSURS3$)Nz<FileHash mode: z value: �>�r�rEr*s r,r��FileHash.__repr__Hs��!�$�)�)��H�T�Z�Z�L��B�Br/rN)r�r8r7r�r6)r9r:r;r<rsr�r?r5r/r,r�r�Ds
��7�Cr/r�c�(^�\rSrSrU4SjrSrU=r$)�DeprecatedNonAbstractiLc	�R>�[R"U5VVs1sHn[U5HoDiM M nnnUVs1sH"n[[X5SS5(dM UiM$ nnU(a[R
"SU3[SS9 [TU]!U5$s snnfs snf)N�__isabstractmethod__FzUnimplemented abstract methods �)�
stacklevel)	�inspect�getmrorqr�warnings�warn�DeprecationWarning�super�__new__)rOr2�kwargs�subclassr)�	all_names�abstractr�s       �r,r�DeprecatedNonAbstract.__new__Ns����!(����!4�
�!4�X��h���D��D�!4�	�
�
"�
�!���w�s�)�+A�5�I�
�!�	�
�
��M�M�1�(��<�"��
�
�w��s�#�#��
��
s�B�B$�#B$r5)r9r:r;r<rr?�
__classcell__�r�s@r,rrLs
���$�$r/rc��\rSrSrSr\RSSj5r\RSSj5r\	SSj5r
\	SS.SSjj5r\S S	j5r
\S
5r\S!Sj5r\S"Sj5r\S
5r\S"Sj5r\S#Sj5r\S$Sj5rSrSrSr\S%Sj5rSrSr\	S5r\S5r\S5rSrSr g)&ri`a*
An abstract Python distribution package.

Custom providers may derive from this class and define
the abstract methods to provide a concrete implementation
for their environment. Some providers may opt to override
the default implementation of some properties to bypass
the file-reading mechanism.
c��g)a`Attempt to load metadata file given by the name.

Python distribution metadata is organized by blobs of text
typically represented as "files" in the metadata directory
(e.g. package-1.0.dist-info). These files include things
like:

- METADATA: The distribution metadata including fields
  like Name and Version and Description.
- entry_points.txt: A series of entry points as defined in
  `the entry points spec <https://packaging.python.org/en/latest/specifications/entry-points/#file-format>`_.
- RECORD: A record of files according to
  `this recording spec <https://packaging.python.org/en/latest/specifications/recording-installed-packages/#the-record-file>`_.

A package may provide any set of files, including those
not listed here or none at all.

:param filename: The name of the file in the distribution info.
:return: The text if found, otherwise None.
Nr5�r+�filenames  r,r��Distribution.read_textk��r/c��g)zI
Given a path to a file in this distribution, return a SimplePath
to it.
Nr5�r+�paths  r,r��Distribution.locate_file�rr/c��U(d[S5e[[URUS955$![a [U5ef=f)avReturn the Distribution for the given package name.

:param name: The name of the distribution package to search for.
:return: The Distribution instance (or subclass thereof) for the named
    package, if found.
:raises PackageNotFoundError: When the named package's distribution
    metadata cannot be found.
:raises ValueError: When an invalid value is supplied for name.
z A distribution name is required.r()�
ValueErrorr�r��discoverr�r)rOr)s  r,�	from_name�Distribution.from_name�sM����?�@�@�	-���S�\�\�t�\�4�5�6�6���	-�&�t�,�,�	-�s	� 5�AN)�contextc��^�T(aU(a[S5eT=(d [R"S0UD6m[RRU4SjUR
555$)a
Return an iterable of Distribution objects for all packages.

Pass a ``context`` or pass keyword arguments for constructing
a context.

:context: A ``DistributionFinder.Context`` object.
:return: Iterable of Distribution objects for packages matching
  the context.
z cannot accept context and kwargsc3�2># �UHo"T5v� M g7fr1r5)rH�resolverr)s  �r,rJ�(Distribution.discover.<locals>.<genexpr>�s����-
�.G�(�H�W���.G�s�r5)r%r�Context�	itertools�chain�
from_iterable�_discover_resolvers)rOr)rs ` r,r&�Distribution.discover�s\����v��?�@�@��A�/�7�7�A�&�A�����,�,�-
�.1�.E�.E�.G�-
�
�	
r/c�@�[[R"U55$)z�Return a Distribution for the indicated metadata path.

:param path: a string or path-like object
:return: a concrete Distribution instance for the path
)�PathDistribution�pathlib�Path�r"s r,�at�Distribution.at�s�� ����T� 2�3�3r/c�H�S[R5n[SU5$)z9Search the meta_path for resolvers (MetadataPathFinders).c3�<# �UHn[USS5v� M g7f)�find_distributionsNr�)rH�finders  r,rJ�3Distribution._discover_resolvers.<locals>.<genexpr>�s ���
�FS�F�G�F�0�$�7�7�m�s�N)�sys�	meta_pathrV)�declareds r,r2� Distribution._discover_resolvers�s$��
�FI�m�m�
���d�H�%�%r/c��SSKJn URS5=(d) URS5=(d URS5n[[U5nUR[R"U55$)aFReturn the parsed metadata for this Distribution.

The returned object will have keys that name the various bits of
metadata per the
`Core metadata specifications <https://packaging.python.org/en/latest/specifications/core-metadata/#core-metadata>`_.

Custom providers may provide the METADATA file or override this
property.
r)�	_adapters�METADATAzPKG-INFOrx)rxrEr�rr8�Message�email�message_from_string)r+rE�opt_textrPs    r,r!�Distribution.metadata�sh��	 �
�N�N�:�&�
"��~�~�j�)�
"�
�~�~�b�!�
	��C��"��� � ��!:�!:�4�!@�A�Ar/c� �URS$)z8Return the 'Name' metadata for the distribution package.�Name�r!r*s r,r)�Distribution.name�s���}�}�V�$�$r/c�@�[RUR5$)z(Return a normalized version of the name.)�Prepared�	normalizer)r*s r,�_normalized_name�Distribution._normalized_name�s���!�!�$�)�)�,�,r/c� �URS$)z;Return the 'Version' metadata for the distribution package.�VersionrNr*s r,r$�Distribution.version�s���}�}�Y�'�'r/c�L�[RURS5U5$)z�
Return EntryPoints for this distribution.

Custom providers may provide the ``entry_points.txt`` file
or override this property.
zentry_points.txt)r�r�r�r*s r,r�Distribution.entry_points�s!���)�)�$�.�.�9K�*L�d�S�Sr/c��^^�SU4Sjjm[U4Sj5n[S5nU"U"TR5=(d' TR5=(d TR555$)a�Files in this distribution.

:return: List of PackagePath for this distribution or None

Result is `None` if the metadata file that enumerates files
(i.e. RECORD for dist-info, or installed-files.txt or
SOURCES.txt for egg-info) is missing.
Result may be empty if the metadata exists but is empty.

Custom providers are recommended to provide a "RECORD" file (in
``read_text``) or override this property to allow for callers to be
able to resolve filenames provided by the package.
c�>�[U5nU(a[U5OSUlU(a[U5OSUlTUlU$r1)r�r�r�r�r�rm)r)r��size_str�resultr+s    �r,�	make_file�%Distribution.files.<locals>.make_files7��� ��&�F�,0�(�4�.�d�F�K�+3�#�h�-��F�K��F�K��Mr/c�B>�SSKn[TURU55$)Nr)�csvr�reader)r\rar^s  �r,�
make_files�&Distribution.files.<locals>.make_files	s���
��9�c�j�j��&7�8�8r/c�.�[[SU55$)Nc�>�UR5R5$r1)r��existsr8s r,�<lambda>�@Distribution.files.<locals>.skip_missing_files.<locals>.<lambda>s��D�K�K�M�,@�,@�,Br/)�listrV)�
package_pathss r,�skip_missing_files�.Distribution.files.<locals>.skip_missing_filess����B�M�R�S�Sr/)NN)r	�_read_files_distinfo�_read_files_egginfo_installed�_read_files_egginfo_sources)r+rcrlr^s`  @r,r �Distribution.files�sw��� 	�
�	9�
�	9�
�	T�
�	T�"���)�)�+�6��5�5�7�6��3�3�5�
�
�	
r/c�V�URS5nU=(a UR5$)z
Read the lines of RECORD.
�RECORD)r�rY�r+rPs  r,rn�!Distribution._read_files_distinfos$���~�~�h�'���)����)�)r/c��^^�TRS5n[TSS5mU(aT(dgUU4SjUR55n[SRU5$)a�
Read installed-files.txt and return lines in a similar
CSV-parsable format as RECORD: each file must be placed
relative to the site-packages directory and must also be
quoted (since file names can contain literal commas).

This file is written when the package is installed by pip,
but it might not be written for other installation methods.
Assume the file is accurate if it exists.
zinstalled-files.txt�_pathNc3�># �UHQnTU-R5RTRS5R5SS9R5v� MS g7f)rxT)�walk_upN)�resolve�relative_tor��as_posix)rHr)r+�subdirs  ��r,rJ�=Distribution._read_files_egginfo_installed.<locals>.<genexpr>7sU����
�
*��	�d�]�
�W�Y�
�[��)�)�"�-�5�5�7��[�
F�
�X�Z�
�*�s�AA�"{}")r�rrYrW�format)r+rP�pathsr}s`  @r,ro�*Distribution._read_files_egginfo_installed$sW����~�~�3�4����w��-���6��
�
���)�
���6�=�=�%�(�(r/c�~�URS5nU=(a$ [SRUR55$)a�
Read SOURCES.txt and return lines in a similar CSV-parsable
format as RECORD: each file name must be quoted (since it
might contain literal commas).

Note that SOURCES.txt is not a reliable source for what
files are installed by a package. This file is generated
for a source archive, and the files that are present
there (e.g. setup.py) may not correctly reflect the files
that are present after the package has been installed.
zSOURCES.txtr)r�rWr�rYrts  r,rp�(Distribution._read_files_egginfo_sources@s/���~�~�m�,���=��F�M�M�4�?�?�+<�=�=r/c�x�UR5=(d UR5nU=(a [U5$)z6Generated requirements specified for this Distribution)�_read_dist_info_reqs�_read_egg_info_reqsrj)r+�reqss  r,r#�Distribution.requiresOs/���(�(�*�H�d�.F�.F�.H���"��T�
�"r/c�8�URRS5$)Nz
Requires-Dist)r!�get_allr*s r,r��!Distribution._read_dist_info_reqsUs���}�}�$�$�_�5�5r/c�Z�URS5n[UR5"U5$)Nzrequires.txt)r�r	�_deps_from_requires_text)r+�sources  r,r�� Distribution._read_egg_info_reqsXs&������/����6�6�7��?�?r/c�J�UR[RU55$r1)�%_convert_egg_info_reqs_to_simple_reqsrArM)rOr�s  r,r��%Distribution._deps_from_requires_text\s���8�8�����9O�P�Pr/c#�^# �SmU4SjnSnUH9nU"UR5nURU-U"UR5-v� M; g7f)a�
Historically, setuptools would solicit and store 'extra'
requirements, including those with environment markers,
in separate sections. More modern tools expect each
dependency to be defined separately, with any relevant
extras and environment markers attached directly to that
requirement. This method converts the former to the
latter. See _test_deps_from_requires_text for an example.
c� �U=(a SUS3$)Nz
extra == "�"r5r(s r,�make_condition�JDistribution._convert_egg_info_reqs_to_simple_reqs.<locals>.make_conditionls���0�j���a�0�0r/c	��>�U=(d SnURS5upnU(a
U(aSUS3n[[SUT"U5/55nU(aSSRU5-$S$)Nrx�:r�r�z; z and )r�rjrV�join)rI�extra�sep�markers�
conditionsr�s     �r,�
quoted_marker�IDistribution._convert_egg_info_reqs_to_simple_reqs.<locals>.quoted_markerosi����m��G�")�"3�"3�C�"8��E�����g�Y�a�.���f�T�G�^�E�5J�+K�L�M�J�6@�4�'�,�,�z�2�2�H�b�Hr/c��SSU;-$)zi
PEP 508 requires a space between the url_spec and the quoted_marker.
Ref python/importlib_metadata#357.
� �@r5)�reqs r,�
url_req_space�IDistribution._convert_egg_info_reqs_to_simple_reqs.<locals>.url_req_spacews���#��*�%�%r/N)rEr))�sectionsr�r�rI�spacer�s     @r,r��2Distribution._convert_egg_info_reqs_to_simple_reqs`sM����	1�	I�	&� �G�!�'�-�-�0�E��-�-�%�'�-����*E�E�E� �s�A
Ac�$�URS5$)Nzdirect_url.json)�
_load_jsonr*s r,�origin�Distribution.origin�s�����0�1�1r/c�^�[[R5"URU5SS9$)Nc�.�[R"S0UD6$r�)�types�SimpleNamespace)�datas r,rh�)Distribution._load_json.<locals>.<lambda>�s��U�%:�%:�%B�T�%Br/)�object_hook)r	�json�loadsr�rs  r,r��Distribution._load_json�s'������$��N�N�8�$�B�
�	
r/r5)r7�
Optional[str]�r"�str | os.PathLike[str]r7r
)r)r8r7r)r)z$Optional[DistributionFinder.Context]r7�Iterable[Distribution])r"r�r7r)r7�_meta.PackageMetadatar6r�)r7�Optional[List[PackagePath]])r7�Optional[List[str]])!r9r:r;r<r=�abc�abstractmethodr�r�rgr'r&rhr9r2r>r!r)rSr$rr rnrorpr#r�r�r�r�r�r�r?r5r/r,rr`s����	������,	�������-��-�"�@D�
�=�
�	�
��
�&�4��4��&��&��B��B�0�%��%��-��-��(��(��T��T��(
��(
�T*�)�8
>��#��#�
6�@��Q��Q�� F�� F�D�2��2�
r/rc�d�\rSrSrSr"SS5r\R\"54SSjj5rSr	g)	ri�z�
A MetaPathFinder capable of discovering installed distributions.

Custom providers should implement this interface in order to
supply metadata.
c�8�\rSrSrSrSrSr\SSj5rSr	g)�DistributionFinder.Contexti�a
Keyword arguments presented by the caller to
``distributions()`` or ``Distribution.discover()``
to narrow the scope of a search for distributions
in all DistributionFinders.

Each DistributionFinder may expect any parameters
and should attempt to honor the canonical
parameters defined below when appropriate.

This mechanism gives a custom provider a means to
solicit additional details from the caller beyond
"name" and "path" when searching distributions.
For example, imagine a provider that exposes suites
of packages in either a "public" or "private" ``realm``.
A caller may wish to query only for distributions in
a particular realm and could call
``distributions(realm="private")`` to signal to the
custom provider to only include distributions from that
realm.
Nc�8�[U5RU5 gr1rp)r+rs  r,rs�#DistributionFinder.Context.__init__�s����J���f�%r/c�T�[U5RS[R5$)z�
The sequence of directory path that a distribution finder
should search.

Typically refers to Python installed package paths such as
"site-packages" directories and defaults to ``sys.path``.
r")rq�getr@r"r*s r,r"�DistributionFinder.Context.path�s����:�>�>�&�#�(�(�3�3r/r5r�)
r9r:r;r<r=r)rsr>r"r?r5r/r,r.r��s,��	�,��	�
	&�
�	4�
�	4r/r.c��g)z�
Find distributions.

Return an iterable of all Distribution instances capable of
loading the metadata for packages matching the ``context``,
a DistributionFinder.Context instance.
Nr5)r+r)s  r,r=�%DistributionFinder.find_distributions�rr/r5N�r7r�)
r9r:r;r<r=r.r�r�r=r?r5r/r,rr�s1���)4�)4�V	���)0����r/rc�^�\rSrSrSr\R"5U4Sj5rSrSr	Sr
SrSr\
S	5r\S
5rSrU=r$)�FastPathi�aM
Micro-optimized class for searching a root for children.

Root is a path on the file system that may contain metadata
directories either as natural directories or within a zip file.

>>> FastPath('').children()
['...']

FastPath objects are cached and recycled for any given root.

>>> FastPath('foobar') is FastPath('foobar')
True
c�">�[TU]U5$r1)rr)rO�rootr�s  �r,r�FastPath.__new__�s����w��s�#�#r/c��Xlgr1)r�)r+r�s  r,rs�FastPath.__init__�s���	r/c�D�[R"URU5$r1)r6r7r�)r+�childs  r,�joinpath�FastPath.joinpath�s���|�|�D�I�I�u�-�-r/c��[[5 [R"UR=(d S5sSSS5 $!,(df   O=f[[5 UR5sSSS5 $!,(df   /$=f�Nry)r�	Exception�os�listdirr��zip_childrenr*s r,�children�FastPath.children�sP��
�i�
 ��:�:�d�i�i�.�3�/�!�
 �
 ��
�i�
 ��$�$�&�!�
 �
 ��	�s�)A�
A�#A=�=
Bc���[R"UR5nURR5nURUl[
R
SU55$)Nc3�f# �UH'oR[RS5Sv� M) g7f)rrN)r|�	posixpathr�)rHr�s  r,rJ�(FastPath.zip_children.<locals>.<genexpr>�s"���Q�5�%�[�[�����:�1�=�5�s�/1)�zipfiler7r��namelistr��dict�fromkeys)r+�zip_pathr�s   r,r��FastPath.zip_children�sH���<�<��	�	�*���
�
�&�&�(�� �)�)��
��}�}�Q�5�Q�Q�Qr/c�V�URUR5RU5$r1)�lookup�mtime�searchr3s  r,r��FastPath.search�s ���{�{�4�:�:�&�-�-�d�3�3r/c���[[5 [R"UR5R
sSSS5 $!,(df   O=fURR5 gr1)r�OSErrorr��statr��st_mtimer��cache_clearr*s r,r��FastPath.mtime�s<��
�g�
��7�7�4�9�9�%�.�.��
�
�������!s�*A�
Ac��[U5$r1)�Lookup)r+r�s  r,r��FastPath.lookup�s���d�|�r/)r�r�)r9r:r;r<r=r}�	lru_cacherrsr�r�r�r�r>r�rr�r?rrs@r,r�r��sg���
�����$��$��.��R�4��"��"�
���r/r�c�,�\rSrSrSrSSjrSSjrSrg)	r�izC
A micro-optimized class for searching a (fast) path for metadata.
c��[RRUR5R	5nURS5n[
[5Ul[
[5Ul	UR5GH
nUR	5nURS5(ajURS5SRS5Sn[RU5nURURUR!U55 M�U(dM�US:XdM�URS5SRS5Sn[R#U5nURURUR!U55 GM URR%5 URR%5 g)z�
Calculate all of the children representing metadata.

From the children in the path, calculate early all of the
children that appear to represent metadata (infos) or legacy
metadata (eggs).
z.egg�z
.dist-infoz	.egg-inforyr�-zegg-infoN)r�r"�basenamer��lowerr[rrj�infos�eggsr��
rpartitionr�rQrR�appendr��legacy_normalize�freeze)	r+r"�base�base_is_eggr��lowr)�
normalized�legacy_normalizeds	         r,rs�Lookup.__init__sL���w�w����	�	�*�0�0�2���m�m�F�+��)�$�/��
�(��.��	��]�]�_�E��+�+�-�C��|�|�7�8�8��~�~�c�*�1�-�7�7��<�Q�?��%�/�/��5�
��
�
�:�&�-�-�d�m�m�E�.B�C����
�!2����s�+�A�.�8�8��=�a�@��$,�$=�$=�d�$C�!��	�	�+�,�3�3�D�M�M�%�4H�I�%�	
�
�
�����	�	���r/c��U(aURURO6[RR	URR55nU(aURURO6[RR	URR55n[R"X#5$)z7
Yield all infos and eggs matching the Prepared query.
)r�rr/r0r1r�rr	)r+�preparedr�rs    r,r��
Lookup.search$s����
�J�J�x�*�*�+����.�.�t�z�z�/@�/@�/B�C�	��
�I�I�h�0�0�1����.�.�t�y�y�/?�/?�/A�B�	
�
���u�+�+r/)rr�N)r"r�)rrQ)r9r:r;r<r=rsr�r?r5r/r,r�r�s����:,r/r�c�P�\rSrSrSrSrSrS	Sjr\S5r	\S5r
SrSrg)
rQi5a�
A prepared search query for metadata on a possibly-named package.

Pre-calculates the normalization to prevent repeated operations.

>>> none = Prepared(None)
>>> none.normalized
>>> none.legacy_normalized
>>> bool(none)
False
>>> sample = Prepared('Sample__Pkg-name.foo')
>>> sample.normalized
'sample_pkg_name_foo'
>>> sample.legacy_normalized
'sample__pkg_name.foo'
>>> bool(sample)
True
Nc�p�XlUcgURU5UlURU5Ulgr1)r)rRrrr	r3s  r,rs�Prepared.__init__Ls2���	��<���.�.��.���!%�!6�!6�t�!<��r/c�n�[R"SSU5R5RSS5$)z3
PEP 503 normalization plus dashes as underscores.
z[-_.]+r�r)r��subr��replacer(s r,rR�Prepared.normalizeSs-��
�v�v�i��d�+�1�1�3�;�;�C��E�Er/c�B�UR5RSS5$)zd
Normalize the package name as found in the convention in
older packaging tools versions and specs.
r�r)r�rr(s r,r�Prepared.legacy_normalizeZs���z�z�|�#�#�C��-�-r/c�,�[UR5$r1)�boolr)r*s r,�__bool__�Prepared.__bool__bs���D�I�I��r/)r	r)r)r)r�)
r9r:r;r<r=rr	rsrhrRrrr?r5r/r,rQrQ5sH���&�J���=��F��F��.��.�r/rQc�p�\rSrSr\\R
54SSjj5r\S5r\SSj5r	Sr
g)	�MetadataPathFinderifc�n�URURUR5n[[U5$)z�
Find distributions.

Return an iterable of all Distribution instances capable of
loading the metadata for packages matching ``context.name``
(or all names if ``None`` indicated) along the paths in the list
of directories ``context.path``.
)�
_search_pathsr)r"rWr5)rOr)�founds   r,r=�%MetadataPathFinder.find_distributionsgs,���!�!�'�,�,����=���#�U�+�+r/c�^�[U5m[RRU4Sj[	[
U555$)z1Find metadata directories in paths heuristically.c3�D># �UHoRT5v� M g7fr1)r�)rHr"rs  �r,rJ�3MetadataPathFinder._search_paths.<locals>.<genexpr>zs����-
�.B�d�K�K��!�!�.B�r�)rQr/r0r1rWr�)rOr)r�rs   @r,r� MetadataPathFinder._search_pathsvs9����D�>�����,�,�-
�.1�(�E�.B�-
�
�	
r/c�@�[RR5 gr1)r�rr�)rOs r,�invalidate_caches�$MetadataPathFinder.invalidate_caches~s�����$�$�&r/r5N)r7zIterable[PathDistribution])r7r�)r9r:r;r<rgrr.r=rr&r?r5r/r,rrfsP���'�/�/�1�,�	#�,��,��
��
��'��'r/rc�^�\rSrSrSSjrS	Sjr\R
R\lS
Sjr\	U4Sj5r
\S5rSr
U=r$)r5i�c��Xlg)zVConstruct a distribution.

:param path: SimplePath indicating the metadata directory.
N�rwr!s  r,rs�PathDistribution.__init__�s	��
�
r/c���[[[[[[
5 URRU5RSS9sSSS5 $!,(df   g=f)Nr�r�)	r�FileNotFoundError�IsADirectoryErrorr��NotADirectoryError�PermissionErrorrwr�r�rs  r,r��PathDistribution.read_text�sP��
������
��:�:�&�&�x�0�:�:�G�:�L�
�
�
��s�(A�
A$c�4�URRU-$r1)rw�parentr!s  r,r��PathDistribution.locate_file�s���z�z� � �4�'�'r/c��>�[RR[UR55n[[R5"URU55=(d
 [TU]($)zb
Performance optimization: where possible, resolve the
normalized name from the file system path.
)r�r"r�r8rwr	rQrR�_name_from_stemrrS)r+�stemr�s  �r,rS�!PathDistribution._normalized_name�sQ����w�w����D�J�J��0���h�(�(�)�$�*>�*>�t�*D�E�
(��w�'�	
r/c�~�[RRU5upUS;agURS5up4nU$)z�
>>> PathDistribution._name_from_stem('foo-3.0.egg-info')
'foo'
>>> PathDistribution._name_from_stem('CherryPy-3.0.dist-info')
'CherryPy'
>>> PathDistribution._name_from_stem('face.egg-info')
'face'
>>> PathDistribution._name_from_stem('foo.bar')
r�Nr�)r�r"�splitextr�)r7r�extr)r��rests      r,r6� PathDistribution._name_from_stem�s?�����(�(��.�
���1�1��"�,�,�S�1���4��r/r*)r"r
r7r�)rr�r7r�r�)r9r:r;r<rsr�rr=r�r>rSrhr6r?rrs@r,r5r5�sP����
�%�.�.�6�6�I��(��	
��	
����r/r5c�,�[RU5$)z�Get the ``Distribution`` instance for the named package.

:param distribution_name: The name of the distribution package as a string.
:return: A ``Distribution`` instance (or subclass thereof).
)rr'��distribution_names r,rr�s���!�!�"3�4�4r/c�.�[R"S0UD6$)ztGet all ``Distribution`` instances in the current environment.

:return: An iterable of ``Distribution`` instances.
r5)rr&)rs r,rr�s��
� � �*�6�*�*r/c�@�[RU5R$)z�Get the metadata for the named package.

:param distribution_name: The name of the distribution package to query.
:return: A PackageMetadata containing the parsed metadata.
)rr'r!r?s r,r!r!�s���!�!�"3�4�=�=�=r/c�,�[U5R$)z�Get the version string for the named package.

:param distribution_name: The name of the distribution package to query.
:return: The version string for the package as defined in the package's
    "Version" metadata key.
)rr$r?s r,r$r$�s���)�*�2�2�2r/rS)�keyc��[RRS[[	5555n[U5R"S0UD6$)z�Return EntryPoint objects for all installed packages.

Pass selection parameters (group or name) to filter the
result to entry points matching those properties (see
EntryPoints.select()).

:return: EntryPoints for all installed packages.
c3�8# �UHoRv� M g7fr1)r)rHrms  r,rJ�entry_points.<locals>.<genexpr>�s���(�&>�d���&>�s�r5)r/r0r1�_uniquerr�r�)r��epss  r,rr�sG���/�/�
'�
'�(�&-�m�o�&>�(��C��s��"�"�,�V�,�,r/c�,�[U5R$)z�Return a list of files for the named package.

:param distribution_name: The name of the distribution package to query.
:return: List of files composing the distribution.
)rr r?s r,r r �s���)�*�0�0�0r/c�,�[U5R$)z�
Return a list of requirements for the named package.

:return: An iterable of requirements, suitable for
    packaging.requirement.Requirement.
)rr#r?s r,r#r#�s���)�*�3�3�3r/c��[R"[5n[5HGn[	U5=(d [U5H#nXR
URS5 M% MI [U5$)z�
Return a mapping of top-level packages to their
distributions.

>>> import collections.abc
>>> pkgs = packages_distributions()
>>> all(isinstance(dist, collections.abc.Sequence) for dist in pkgs.values())
True
rM)	�collections�defaultdictrjr�_top_level_declared�_top_level_inferredrr!r�)�pkg_to_distrm�pkgs   r,r"r"	se���)�)�$�/�K����&�t�,�I�0C�D�0I�I�C���#�#�D�M�M�&�$9�:�J� ����r/c�R�URS5=(d SR5$)Nz
top_level.txtrx)r�r|r�s r,rOrOs���N�N�?�+�1�r�8�8�:�:r/c�2�URtpU(aU$S$)z:
Return the top-most parent as long as there is a parent.
N)�parts)r)�topr<s   r,�_topmostrWs�����J�C��3� �D� r/c�v�[U5=(d( [R"U5=(d [U5$)a�
Infer a possibly importable module name from a name presumed on
sys.path.

>>> _get_toplevel_name(PackagePath('foo.py'))
'foo'
>>> _get_toplevel_name(PackagePath('foo'))
'foo'
>>> _get_toplevel_name(PackagePath('foo.pyc'))
'foo'
>>> _get_toplevel_name(PackagePath('foo/__init__.py'))
'foo'
>>> _get_toplevel_name(PackagePath('foo.pth'))
'foo.pth'
>>> _get_toplevel_name(PackagePath('foo.dist-info'))
'foo.dist-info'
)rWr�
getmodulenamer8r(s r,�_get_toplevel_namerZ&s/��$�D�>�����d�#�	��t�9�r/c�v�[[[[UR555nSn[X!5$)Nc��SU;$r�r5r(s r,�importable_name�,_top_level_inferred.<locals>.importable_nameBs���$��r/)�setrWrZr
r rV)rm�	opt_namesr]s   r,rPrP?s/���C�*�O�D�J�J�,G�H�I�I���/�-�-r/)r@r8r7rr�)r@r8r7r�)r@r8r7r8r�)r@r8r7r�)r@r8r7r�)r7zMapping[str, List[str]])r)r�r7r�)r)r�r7r8)Q�
__future__rr�r�r�r@r�rHr�rr6r�r�rcrr}r/r�rMrxr�_collectionsrr�
_functoolsrr	�
_itertoolsr
rrr
�
contextlibr�	importlibr�
importlib.abcrr�typingrrrrrrrr�__all__�ModuleNotFoundErrorrrArjr�r��
PurePosixPathr�r�rrrr�r�rQrr5rrr!r$�partial�
attrgetterrHrr r#r"rOrWrZrPr5r/r,�<module>rns}��"�	�	�
�
���������������4�/�8�.��#�(��K�K�K�
�� 	�.�	�>1�>1�By!�y!�x5
�%�5
�p+�'�'�'�+�$C�C�$�$�(k
�(�k
�\	;��;�|3�3�l0,�0,�f.�.�b'�+�'�:4�|�4�n5�+�>�3��
�
�����.�/����
-�1�4��";�!��2.r/

?>