403Webshell
Server IP : 217.160.0.135  /  Your IP : 216.73.217.85
Web Server : Apache
System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64
User : sws1074145052 ( 1074145052)
PHP Version : 8.3.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/pip/_internal/metadata/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/pip/_internal/metadata/__pycache__/base.cpython-311.pyc
�

�/�c�b���ddlZddlZddlZddlZddlZddlZddlZddlZddl	m
Z
mZmZm
Z
mZmZmZmZmZmZmZmZmZddlmZddlmZmZddlmZddlmZm Z ddl!m"Z"ddl#m$Z$m%Z%dd	l&m'Z'm(Z(m)Z)dd
l*m+Z+ddl,m-Z-ddl.m/Z/m0Z0dd
l1m2Z2ddl3m4Z4ddl5m6Z6erddl	m7Z7ne8Z7eee fZ9ee:ej;fZ<ej=e>��Z?Gd�de7��Z@dee:dfdee:dfde:fd�ZAGd�de��ZBGd�de7��ZCGd�d��ZDGd�d e7��ZEGd!�d"eE��ZFGd#�d$eE��ZGdS)%�N)
�IO�
TYPE_CHECKING�Any�
Collection�	Container�Dict�Iterable�Iterator�List�
NamedTuple�Optional�Tuple�Union)�Requirement)�InvalidSpecifier�SpecifierSet)�NormalizedName)�
LegacyVersion�Version)�NoneMetadataError)�
site_packages�	user_site)�DIRECT_URL_METADATA_NAME�	DirectUrl�DirectUrlValidationError)�stdlib_pkgs)�egg_link_path_from_sys_path)�is_local�normalize_path)�
safe_extra)�url_to_path�)�msg_to_json)�Protocolc�b�eZdZedefd���Zedefd���Zedefd���ZdS)�BaseEntryPoint�returnc��t����N��NotImplementedError��selfs �=/usr/lib/python3/dist-packages/pip/_internal/metadata/base.py�namezBaseEntryPoint.name:���!�#�#�#�c��t���r)r*r,s r.�valuezBaseEntryPoint.value>r0r1c��t���r)r*r,s r.�groupzBaseEntryPoint.groupBr0r1N)�__name__�
__module__�__qualname__�property�strr/r3r5�r1r.r&r&9s�������
�$�c�$�$�$��X�$��$�s�$�$�$��X�$��$�s�$�$�$��X�$�$�$r1r&�entry.�infor'c���|rB|ddkr6|r|ddkr|dz
}n
|dd�}|dd�}|r|ddk�6ttjg|�|�R���S)a�Convert a legacy installed-files.txt path into modern RECORD path.

    The legacy format stores paths relative to the info directory, while the
    modern format stores paths relative to the package root, e.g. the
    site-packages directory.

    :param entry: Path parts of the installed-files.txt entry.
    :param info: Path parts of the egg-info directory relative to package root.
    :returns: The converted entry.

    For best compatibility with symlinks, this does not use ``abspath()`` or
    ``Path.resolve()``, but tries to work with path parts:

    1. While ``entry`` starts with ``..``, remove the equal amounts of parts
       from ``info``; if ``info`` is empty, start appending ``..`` instead.
    2. Join the two directly.
    r�..���)r?Nr"�r:�pathlib�Path)r<r=s  r.�_convert_installed_files_pathrDGs���*��E�!�H��$�$��	�t�B�x�4�'�'��G�O�D�D�����9�D��a�b�b�	����E�!�H��$�$��w�|�*�T�*�E�*�*�*�+�+�+r1c�.�eZdZUeed<eed<eed<dS)�
RequiresEntry�requirement�extra�markerN)r6r7r8r:�__annotations__r;r1r.rFrFes.������������J�J�J��K�K�K�K�Kr1rFc	�Z�eZdZededdfd���Zededededdfd���Zedd	d
eddfd���Zdefd�Z	defd
�Z
edeefd���Z
edeefd���Zedeefd���Zedeefd���Zedefd���Zedefd���Zedefd���Zedefd���Zedefd���Zedefd���Zedefd���Zedeefd���Zedefd���Zedefd���Zedefd���Zedefd���Z edefd���Z!edefd���Z"d e#defd!�Z$de%efd"�Z&d e#defd#�Z'de(e)fd$�Z*de+j,j-fd%�Z.e/j0d&�'��de+j,j-fd(���Z1ede+j,j-fd)���Z2ede3ee4ffd*���Z5edeefd+���Z6edefd,���Z7ede8fd-���Z9d;d/e:ede(e;fd0�Z<de(efd1�Z=dee%efd2�Z>dee%efd3�Z?dee%efd4�Z@de%eAfd5�ZBde(efd6�ZCde(efd7�ZDd8e+j,j-dd9fd:�ZEd9S)<�BaseDistribution�	directoryr'c��t���)z�Load the distribution from a metadata directory.

        :param directory: Path to a metadata directory, e.g. ``.dist-info``.
        r*)�clsrMs  r.�from_directoryzBaseDistribution.from_directoryl���"�#�#�#r1�metadata_contents�filename�project_namec��t���)a�Load the distribution from the contents of a METADATA file.

        This is used to implement PEP 658 by generating a "shallow" dist object that can
        be used for resolution without downloading or building the actual dist yet.

        :param metadata_contents: The contents of a METADATA file.
        :param filename: File name for the dist with this metadata.
        :param project_name: Name of the project this dist represents.
        r*)rOrRrSrTs    r.�from_metadata_file_contentsz,BaseDistribution.from_metadata_file_contentsts�� "�#�#�#r1�wheel�Wheelr/c��t���)aLoad the distribution from a given wheel.

        :param wheel: A concrete wheel definition.
        :param name: File name of the wheel.

        :raises InvalidWheel: Whenever loading of the wheel causes a
            :py:exc:`zipfile.BadZipFile` exception to be thrown.
        :raises UnsupportedWheel: If the wheel is a valid zip, but malformed
            internally.
        r*)rOrWr/s   r.�
from_wheelzBaseDistribution.from_wheel����"�#�#�#r1c�6�|j�d|j�d|j�d�S)N� z (�))�raw_name�version�locationr,s r.�__repr__zBaseDistribution.__repr__�s'���-�B�B�$�,�B�B�$�-�B�B�B�Br1c�$�|j�d|j��S)Nr])r_r`r,s r.�__str__zBaseDistribution.__str__�s���-�0�0�$�,�0�0�0r1c��t���)a�Where the distribution is loaded from.

        A string value is not necessarily a filesystem path, since distributions
        can be loaded from other sources, e.g. arbitrary zip archives. ``None``
        means the distribution is created in-memory.

        Do not canonicalize this value with e.g. ``pathlib.Path.resolve()``. If
        this is a symbolic link, we want to preserve the relative path between
        it and files in the distribution.
        r*r,s r.razBaseDistribution.location�r[r1c��|j}|r)|���rt|j��Snt	|j��}|r|jSdS)z�The project location for editable distributions.

        This is the directory where pyproject.toml or setup.py is located.
        None if the distribution is not installed in editable mode.
        N)�
direct_url�is_local_editabler!�urlrr_ra)r-rg�
egg_link_paths   r.�editable_project_locationz*BaseDistribution.editable_project_location�sd���_�
��
	%��+�+�-�-�
3�"�:�>�2�2�2�
3�
8��
�F�F�M��
%��}�$��tr1c��t���)a�The distribution's "installed" location.

        This should generally be a ``site-packages`` directory. This is
        usually ``dist.location``, except for legacy develop-installed packages,
        where ``dist.location`` is the source code location, and this is where
        the ``.egg-link`` file is.

        The returned location is normalized (in particular, with symlinks removed).
        r*r,s r.�installed_locationz#BaseDistribution.installed_location�s��"�#�#�#r1c��t���)a/Location of the .[egg|dist]-info directory or file.

        Similarly to ``location``, a string value is not necessarily a
        filesystem path. ``None`` means the distribution is created in-memory.

        For a modern .dist-info installation on disk, this should be something
        like ``{location}/{raw_name}-{version}.dist-info``.

        Do not canonicalize this value with e.g. ``pathlib.Path.resolve()``. If
        this is a symbolic link, we want to preserve the relative path between
        it and other files in the distribution.
        r*r,s r.�
info_locationzBaseDistribution.info_location�s��"�#�#�#r1c�d�|j}|sdStj|�����S)aWhether this distribution is installed with legacy distutils format.

        A distribution installed with "raw" distutils not patched by setuptools
        uses one single file at ``info_location`` to store metadata. We need to
        treat this specially on uninstallation.
        F)rorBrC�is_file�r-ros  r.�installed_by_distutilsz'BaseDistribution.installed_by_distutils�s5���*�
��	��5��|�M�*�*�2�2�4�4�4r1c�B�|j}|sdS|�d��S)z�Whether this distribution is installed as an egg.

        This usually indicates the distribution was installed by (older versions
        of) easy_install.
        Fz.egg)ra�endswith�r-ras  r.�installed_as_eggz!BaseDistribution.installed_as_egg�s,���=���	��5�� � ��(�(�(r1c��|j}|sdS|�d��sdStj|�����S)a�Whether this distribution is installed with the ``.egg-info`` format.

        This usually indicates the distribution was installed with setuptools
        with an old pip version or with ``single-version-externally-managed``.

        Note that this ensure the metadata store is a directory. distutils can
        also installs an ``.egg-info``, but as a file, not a directory. This
        property is *False* for that case. Also see ``installed_by_distutils``.
        Fz	.egg-info�rorurBrC�is_dirrrs  r.�"installed_with_setuptools_egg_infoz3BaseDistribution.installed_with_setuptools_egg_info�sP���*�
��	��5��%�%�k�2�2�	��5��|�M�*�*�1�1�3�3�3r1c��|j}|sdS|�d��sdStj|�����S)aaWhether this distribution is installed with the "modern format".

        This indicates a "modern" installation, e.g. storing metadata in the
        ``.dist-info`` directory. This applies to installations made by
        setuptools (but through pip, not directly), or anything using the
        standardized build backend interface (PEP 517).
        Fz
.dist-inforyrrs  r.�installed_with_dist_infoz)BaseDistribution.installed_with_dist_infosP���*�
��	��5��%�%�l�3�3�	��5��|�M�*�*�1�1�3�3�3r1c��t���r)r*r,s r.�canonical_namezBaseDistribution.canonical_namer0r1c��t���r)r*r,s r.r`zBaseDistribution.versionr0r1c�8�|j�dd��S)z�Convert a project name to its setuptools-compatible filename.

        This is a copy of ``pkg_resources.to_filename()`` for compatibility.
        �-�_)r_�replacer,s r.�setuptools_filenamez$BaseDistribution.setuptools_filenames���}�$�$�S�#�.�.�.r1c�(�	|�t��}n#t$rYdSwxYw	tj|��S#t
tjtf$r2}t�
dt|j|��Yd}~dSd}~wwxYw)z�Obtain a DirectUrl from this distribution.

        Returns None if the distribution has no `direct_url.json` metadata,
        or if `direct_url.json` is invalid.
        NzError parsing %s for %s: %s)�	read_textr�FileNotFoundErrorr�	from_json�UnicodeDecodeError�json�JSONDecodeErrorr�logger�warningr)r-�content�es   r.rgzBaseDistribution.direct_url&s���	��n�n�%=�>�>�G�G�� �	�	�	��4�4�	����
	��&�w�/�/�/���� �$�
�	�	�	�

�N�N�-�(��#��	
�
�
��4�4�4�4�4�����	���s#��
+�+�A�B�'B�Bc���	|�d��}n#tttf$rYdSwxYw|���D]}|���}|r|cS�dS)N�	INSTALLER�)r��OSError�
ValueErrorr�
splitlines�strip)r-�installer_text�line�cleaned_lines    r.�	installerzBaseDistribution.installer@s���	�!�^�^�K�8�8�N�N����%6�7�	�	�	��2�2�	����"�-�-�/�/�	$�	$�D��:�:�<�<�L��
$�#�#�#�#�
$��rs��3�3c�,�|�d��S)N�	REQUESTED)rqr,s r.�	requestedzBaseDistribution.requestedLs���|�|�K�(�(�(r1c�*�t|j��Sr))�boolrkr,s r.�editablezBaseDistribution.editablePs���D�2�3�3�3r1c�<�|j�dSt|j��S)z|If distribution is installed in the current virtual environment.

        Always True if we're not in a virtualenv.
        NF)rmrr,s r.�localzBaseDistribution.localTs#���"�*��5���/�0�0�0r1c�z�|j�t�dS|j�tt����S�NF)rmr�
startswithrr,s r.�in_usersitezBaseDistribution.in_usersite^s4���"�*�i�.?��5��&�1�1�.��2K�2K�L�L�Lr1c�z�|j�t�dS|j�tt����Sr�)rmrr�rr,s r.�in_site_packagesz!BaseDistribution.in_site_packagesds4���"�*�m�.C��5��&�1�1�.��2O�2O�P�P�Pr1�pathc��t���)z7Check whether an entry in the info directory is a file.r*�r-r�s  r.rqzBaseDistribution.is_filejr0r1c��t���)z�Find distutils 'scripts' entries metadata.

        If 'scripts' is supplied in ``setup.py``, distutils records those in the
        installed distribution's ``scripts`` directory, a file for each script.
        r*r,s r.�iter_distutils_script_namesz,BaseDistribution.iter_distutils_script_namesnrQr1c��t���)z�Read a file in the info directory.

        :raise FileNotFoundError: If ``path`` does not exist in the directory.
        :raise NoneMetadataError: If ``path`` exists in the info directory, but
            cannot be read.
        r*r�s  r.r�zBaseDistribution.read_textv���"�#�#�#r1c��t���r)r*r,s r.�iter_entry_pointsz"BaseDistribution.iter_entry_points���!�#�#�#r1c��t���r)r*r,s r.�_metadata_implzBaseDistribution._metadata_impl�r�r1r")�maxsizec�X�|���}|�|��|Sr))r��_add_egg_info_requires)r-�metadatas  r.�_metadata_cachedz!BaseDistribution._metadata_cached�s.���&�&�(�(���#�#�H�-�-�-��r1c�*�|���S)aMetadata of distribution parsed from e.g. METADATA or PKG-INFO.

        This should return an empty message if the metadata file is unavailable.

        :raises NoneMetadataError: If the metadata file is available, but does
            not contain valid metadata.
        )r�r,s r.r�zBaseDistribution.metadata�s���$�$�&�&�&r1c�*�t|j��S)aPEP 566 compliant JSON-serializable representation of METADATA or PKG-INFO.

        This should return an empty dict if the metadata file is unavailable.

        :raises NoneMetadataError: If the metadata file is available, but does
            not contain valid metadata.
        )r#r�r,s r.�
metadata_dictzBaseDistribution.metadata_dict�s���4�=�)�)�)r1c�6�|j�d��S)zDValue of "Metadata-Version:" in distribution metadata, if available.zMetadata-Version)r��getr,s r.�metadata_versionz!BaseDistribution.metadata_version�s���}� � �!3�4�4�4r1c�B�|j�d|j��S)z*Value of "Name:" in distribution metadata.�Name)r�r�rr,s r.r_zBaseDistribution.raw_name�s��
�}� � ���)<�=�=�=r1c�&�|j�d��}|�t��S	tt|����}nH#t$r;}d}t
�||j|��t��cYd}~Sd}~wwxYw|S)z�Value of "Requires-Python:" in distribution metadata.

        If the key does not exist or contains an invalid value, an empty
        SpecifierSet should be returned.
        zRequires-PythonNz-Package %r has an invalid Requires-Python: %s)r�r�rr:rr�r�r_)r-r3�specr��messages     r.�requires_pythonz BaseDistribution.requires_python�s����
�!�!�"3�4�4���=��>�>�!�	"���E�
�
�+�+�D�D���	"�	"�	"�E�G��N�N�7�D�M�1�5�5�5��>�>�!�!�!�!�!�!�����	"�����s�A	�	
B�0B	�B�	Br;�extrasc��t���)z�Dependencies of this distribution.

        For modern .dist-info distributions, this is the collection of
        "Requires-Dist:" entries in distribution metadata.
        r*)r-r�s  r.�iter_dependenciesz"BaseDistribution.iter_dependencies�rQr1c��t���)z�Extras provided by this distribution.

        For modern .dist-info distributions, this is the collection of
        "Provides-Extra:" entries in distribution metadata.
        r*r,s r.�iter_provided_extrasz%BaseDistribution.iter_provided_extras�rQr1c��	|�d��}n#t$rYdSwxYwd�tj|�����D��S)N�RECORDc3�dK�|]+}ttj|d����V��,dS)rNrA)�.0�rows  r.�	<genexpr>zFBaseDistribution._iter_declared_entries_from_record.<locals>.<genexpr>�s8����S�S�c��G�L��Q��(�(�)�)�S�S�S�S�S�Sr1)r�r��csv�readerr�)r-�texts  r.�"_iter_declared_entries_from_recordz3BaseDistribution._iter_declared_entries_from_record�sg��	��>�>�(�+�+�D�D�� �	�	�	��4�4�	����T�S�S�Z����@Q�@Q�5R�5R�S�S�S�Ss��
&�&c�`��	|�d��}n#t$rYdSwxYwd�|�d���D��}|j}|j}|�|�|S	tj|���|���n#t$r|cYSwxYw�j	s|S�fd�|D��S)Nzinstalled-files.txtc3�K�|]}|�|V��	dSr)r;)r��ps  r.r�zFBaseDistribution._iter_declared_entries_from_legacy.<locals>.<genexpr>�s'����A�A�q�q�A��A�A�A�A�A�Ar1F)�keependsc3�p�K�|]0}ttj|��j�j��V��1dSr))rDrBrC�parts)r�r��info_rels  �r.r�zFBaseDistribution._iter_declared_entries_from_legacy.<locals>.<genexpr>�sN�����
�
��
*�'�,�q�/�/�*?���P�P�
�
�
�
�
�
r1)
r�r�r�rarorBrC�relative_tor�r�)r-r��paths�rootr=r�s     @r.�"_iter_declared_entries_from_legacyz3BaseDistribution._iter_declared_entries_from_legacy�s����	��>�>�"7�8�8�D�D�� �	�	�	��4�4�	����A�A�D�O�O�U�O�;�;�A�A�A���}���!���<�4�<��L�	��|�D�)�)�5�5�d�;�;�H�H���	�	�	��L�L�L�	�����~�	��L�
�
�
�
��
�
�
�	
s��
'�'�'B�B�Bc�R�|���p|���S)a�Iterate through file entries declared in this distribution.

        For modern .dist-info distributions, this is the files listed in the
        ``RECORD`` metadata file. For legacy setuptools distributions, this
        comes from ``installed-files.txt``, with entries normalized to be
        compatible with the format used by ``RECORD``.

        :return: An iterator for listed entries, or None if the distribution
            contains neither ``RECORD`` nor ``installed-files.txt``.
        )r�r�r,s r.�iter_declared_entriesz&BaseDistribution.iter_declared_entries�s,��
�3�3�5�5�
9��6�6�8�8�	
r1c#�K�	|�d��}n#t$rYdSwxYwdx}}|���D]�}|���}|r|�d��r�.|�d��rB|�d��r-|�d���d��\}}}��t|||�	��V���dS)
a�Parse a ``requires.txt`` in an egg-info directory.

        This is an INI-ish format where an egg-info stores dependencies. A
        section name describes extra other environment markers, while each entry
        is an arbitrary string (not a key-value pair) representing a dependency
        as a requirement string (no markers).

        There is a construct in ``importlib.metadata`` called ``Sectioned`` that
        does mostly the same, but the format is currently considered private.
        zrequires.txtNr��#�[�]z[]�:)rGrHrI)r�r�r�r�r�ru�	partitionrF)r-r�rHrIr�r�s      r.�_iter_requires_txt_entriesz+BaseDistribution._iter_requires_txt_entries�s����	��n�n�^�4�4�G�G�� �	�	�	��F�F�	���������&�&�(�(�	N�	N�D��:�:�<�<�D��
�4�?�?�3�/�/�
�����s�#�#�
��
�
�c�(:�(:�
�#'�:�:�d�#3�#3�#=�#=�c�#B�#B� ��q�&���D��f�M�M�M�M�M�M�M�	N�	Ns��
(�(c#�K�dh}|���D]/}|j|vr�|�|j��|jV��0dS)z'Get extras from the egg-info directory.r�N)r�rH�add)r-�known_extrasr<s   r.�_iter_egg_info_extrasz&BaseDistribution._iter_egg_info_extrassi�����t���4�4�6�6�	�	�E��{�l�*�*�����U�[�)�)�)��+�����		�	r1c#�,K�|���D]|}|jr(|jr!d|j�dt|j���d�}n1|jrdt|j���d�}n|jr|j}nd}|r|j�d|��V��s|jV��}dS)a�Get distribution dependencies from the egg-info directory.

        To ease parsing, this converts a legacy dependency entry into a PEP 508
        requirement string. Like ``_iter_requires_txt_entries()``, there is code
        in ``importlib.metadata`` that does mostly the same, but not do exactly
        what we need.

        Namely, ``importlib.metadata`` does not normalize the extra name before
        putting it into the requirement string, which causes marker comparison
        to fail because the dist-info format do normalize. This is consistent in
        all currently available PEP 517 backends, although not standardized.
        �(z) and extra == "�"z
extra == "r�z ; N)r�rHrIr rG)r-r<rIs   r.�_iter_egg_info_dependenciesz,BaseDistribution._iter_egg_info_dependencies!s������4�4�6�6�	(�	(�E��{�
�u�|�
�U�U�\�U�U�:�e�k�;R�;R�U�U�U�����
�@�j���&=�&=�@�@�@�����
��������
(��*�7�7�v�7�7�7�7�7�7��'�'�'�'�'�	(�	(r1r�Nc���|�d��s|���D]}||d<�|�d��s|���D]	}||d<�dSdS)z6Add egg-info requires.txt information to the metadata.z
Requires-DistzProvides-ExtraN)�get_allr�r�)r-r��deprHs    r.r�z'BaseDistribution._add_egg_info_requires<s�������0�0�	0��7�7�9�9�
0�
0��,/���)�)���� 0�1�1�	3��3�3�5�5�
3�
3��-2��)�*�*�	3�	3�
3�
3r1)r;)Fr6r7r8�classmethodr:rP�bytesrVrZrbrdr9r
rarkrmror�rsrwr{r}rr�DistributionVersionr`r�rrgr�r�r�r�r�r��InfoPathrqr
r�r�r	r&r��emailr��Messager��	functools�	lru_cacher�r�rrr�r�r_rr�rrr�r�r�r�r�rFr�r�r�r�r;r1r.rLrLks��������$�s�$�/A�$�$�$��[�$��$� �$��$��	$�

�$�$�$��[�$�"�$�w�$�c�$�6H�$�$�$��[�$�C�#�C�C�C�C�1��1�1�1�1��$�(�3�-�$�$�$��X�$���8�C�=�����X��*�
$�H�S�M�
$�
$�
$��X�
$��
$�x��}�
$�
$�
$��X�
$��
5��
5�
5�
5��X�
5��	)�$�	)�	)�	)��X�	)��4�D�4�4�4��X�4�"�
4�$�
4�
4�
4��X�
4��$��$�$�$��X�$��$�,�$�$�$��X�$��/�S�/�/�/��X�/���H�Y�/�����X��2�	�3�	�	�	��X�	��)�4�)�)�)��X�)��4�$�4�4�4��X�4��1�t�1�1�1��X�1��M�T�M�M�M��X�M�
�Q�$�Q�Q�Q��X�Q�
$�H�$��$�$�$�$�$�X�c�]�$�$�$�$�$�h�$�3�$�$�$�$�$�8�N�#;�$�$�$�$�$��
� 5�$�$�$�$��Y���#�#�#��%�-�"7����$�#���'�%�-�/�'�'�'��X�'��*�t�C��H�~�*�*�*��X�*��5�(�3�-�5�5�5��X�5��>�#�>�>�>��X�>��������X��$$�$�
�3��$��+�AV�$�$�$�$�$�h�s�m�$�$�$�$�T�H�X�c�]�4K�T�T�T�T�
�H�X�c�]�4K�
�
�
�
�*
�x���
�'>�
�
�
�
� N�H�]�,C�N�N�N�N�2�x��}�����(�X�c�]�(�(�(�(�63�u�}�/D�3��3�3�3�3�3�3r1rLc���eZdZdZedd���Zedeeeddfd���Z	dededfd�Z
dedfd	�Zdee
fd
�Zdedddfd
edeededededee
fd�ZdS)�BaseEnvironmentz6An environment containing distributions to introspect.r'c��t���r)r*)rOs r.�defaultzBaseEnvironment.defaultIr0r1r�c��t���r)r*)rOr�s  r.�
from_pathszBaseEnvironment.from_pathsMr0r1r/rLc��t���)z�Given a requirement name, return the installed distributions.

        The name may not be normalized. The implementation must canonicalize
        it for lookup.
        r*)r-r/s  r.�get_distributionz BaseEnvironment.get_distributionQrQr1c��t���)aIterate through installed distributions.

        This function should be implemented by subclass, but never called
        directly. Use the public ``iter_distribution()`` instead, which
        implements additional logic to make sure the distributions are valid.
        r*r,s r.�_iter_distributionsz#BaseEnvironment._iter_distributionsYr�r1c#��K�|���D]U}tjd|jtj���}|s't
�d|j|j���Q|V��VdS)zBIterate through all installed distributions without any filtering.z)^([A-Z0-9]|[A-Z0-9][A-Z0-9._-]*[A-Z0-9])$)�flagsz%Ignoring invalid distribution %s (%s)N)r�re�matchr�
IGNORECASEr�r�ra)r-�dist�project_name_valids   r.�iter_all_distributionsz&BaseEnvironment.iter_all_distributionsbs������,�,�.�.�	�	�D�
"$��<��#��m�"�"�"��
&�
����;��'��M����
��J�J�J�J�#	�	r1TF�
local_only�skip�include_editables�editables_only�	user_onlyc���|���}|rd�|D��}|sd�|D��}|rd�|D��}|rd�|D��}�fd�|D��S)a/Return a list of installed distributions.

        This is based on ``iter_all_distributions()`` with additional filtering
        options. Note that ``iter_installed_distributions()`` without arguments
        is *not* equal to ``iter_all_distributions()``, since some of the
        configurations exclude packages by default.

        :param local_only: If True (default), only return installations
        local to the current virtualenv, if in a virtualenv.
        :param skip: An iterable of canonicalized project names to ignore;
            defaults to ``stdlib_pkgs``.
        :param include_editables: If False, don't report editables.
        :param editables_only: If True, only report editables.
        :param user_only: If True, only report installations in the user
        site directory.
        c3�(K�|]
}|j�	|V��dSr))r��r��ds  r.r�z?BaseEnvironment.iter_installed_distributions.<locals>.<genexpr>�s)����+�+��1�7�+�!�+�+�+�+�+�+r1c3�(K�|]
}|j�	|V��dSr)�r�rs  r.r�z?BaseEnvironment.iter_installed_distributions.<locals>.<genexpr>�s)����2�2��q�z�2�!�2�2�2�2�2�2r1c3�(K�|]
}|j�	|V��dSr)rrs  r.r�z?BaseEnvironment.iter_installed_distributions.<locals>.<genexpr>�s)����.�.��1�:�.�!�.�.�.�.�.�.r1c3�(K�|]
}|j�	|V��dSr))r�rs  r.r�z?BaseEnvironment.iter_installed_distributions.<locals>.<genexpr>�s)����1�1��1�=�1�!�1�1�1�1�1�1r1c3�.�K�|]}|j�v�|V��dSr))r)r�rrs  �r.r�z?BaseEnvironment.iter_installed_distributions.<locals>.<genexpr>�s0�����>�>�a��!1��!=�!=��!=�!=�!=�!=�>�>r1)r)r-rrrrr�its  `    r.�iter_installed_distributionsz,BaseEnvironment.iter_installed_distributionsws����0�
(�
(�
*�
*���	,�+�+�R�+�+�+�B� �	3�2�2�R�2�2�2�B��	/�.�.�R�.�.�.�B��	2�1�1�R�1�1�1�B�>�>�>�>�2�>�>�>�>r1N)r'r�)r6r7r8�__doc__r�rr
rr:rrr
rrLrrr�rrr;r1r.r�r�FsH������@�@��$�$�$��[�$��$�x��S�	�2�$�7H�$�$�$��[�$�$�S�$�X�6H�-I�$�$�$�$�$�X�.@�%A�$�$�$�$���1A�(B�����. �*�"&�$��
!?�!?��!?���n�!?� �	!?�
�!?��
!?�
�"�	#�!?�!?�!?�!?�!?�!?r1r�c�0�eZdZUeed<dejfd�ZdS)rXrar'c��t���r)r*r,s r.�
as_zipfilezWheel.as_zipfile�r�r1N)r6r7r8r:rJ�zipfile�ZipFiler"r;r1r.rXrX�s<��������M�M�M�$�G�O�$�$�$�$�$�$r1rXc�4�eZdZdeddfd�Zdejfd�ZdS)�FilesystemWheelrar'Nc��||_dSr))rarvs  r.�__init__zFilesystemWheel.__init__�s
�� ��
�
�
r1c�8�tj|jd���S�NT)�
allowZip64)r#r$rar,s r.r"zFilesystemWheel.as_zipfile�s����t�}��>�>�>�>r1)r6r7r8r:r(r#r$r"r;r1r.r&r&�sS������!��!��!�!�!�!�?�G�O�?�?�?�?�?�?r1r&c�D�eZdZdedeeddfd�Zdejfd�Z	dS)�MemoryWheelra�streamr'Nc�"�||_||_dSr))rar.)r-rar.s   r.r(zMemoryWheel.__init__�s�� ��
�����r1c�8�tj|jd���Sr*)r#r$r.r,s r.r"zMemoryWheel.as_zipfile�s����t�{�t�<�<�<�<r1)
r6r7r8r:rr�r(r#r$r"r;r1r.r-r-�s^���������b��i��D�����=�G�O�=�=�=�=�=�=r1r-)Hr��
email.messager�r�r��loggingrBr	r#�typingrrrrrrr	r
rrr
rr�"pip._vendor.packaging.requirementsr� pip._vendor.packaging.specifiersrr�pip._vendor.packaging.utilsr�pip._vendor.packaging.versionrr�pip._internal.exceptionsr�pip._internal.locationsrr�pip._internal.models.direct_urlrrr�pip._internal.utils.compatr�pip._internal.utils.egg_linkr�pip._internal.utils.miscrr�pip._internal.utils.packagingr �pip._internal.utils.urlsr!�_jsonr#r$�objectr�r:�PurePathr��	getLoggerr6r�r&rDrFrLr�rXr&r-r;r1r.�<module>rDs���
�
�
�
���������������������	�	�	�	����������������������������������� ;�:�:�:�:�:�K�K�K�K�K�K�K�K�6�6�6�6�6�6�@�@�@�@�@�@�@�@�6�6�6�6�6�6�<�<�<�<�<�<�<�<�����������
3�2�2�2�2�2�D�D�D�D�D�D�=�=�=�=�=�=�=�=�4�4�4�4�4�4�0�0�0�0�0�0�����������������H��M�7�2�3����g�&�&�'��	��	�8�	$�	$��$�$�$�$�$�X�$�$�$�,���c��?�,�
��S��/�,�	�,�,�,�,�<�����J����X3�X3�X3�X3�X3�x�X3�X3�X3�vR?�R?�R?�R?�R?�R?�R?�R?�j$�$�$�$�$�H�$�$�$�?�?�?�?�?�e�?�?�?�=�=�=�=�=�%�=�=�=�=�=r1

Youez - 2016 - github.com/yon3zu
LinuXploit