
    df                     D   d dl Z d dlZd dlZd dlZd dlmZmZmZmZm	Z	 d dl
mZ ddlmZmZmZmZmZ erd dlmZ neZg dZdefd	Z G d
 de      Z ej0                  d      defd       ZdefdZdeee      defdZdedefdZdededefdZdedededefdZ y)    N)TYPE_CHECKINGListOptionalTypecast)	strtobool   )BaseDistributionBaseEnvironmentFilesystemWheelMemoryWheelWheel)Protocol)	r
   r   r   r   r   get_default_environmentget_environmentget_wheel_distributionselect_backendreturnc                  $   t        j                  t        t              5  t	        t        t        j                  d               cddd       S # 1 sw Y   nxY wt        j                  dk  ryddl
} t	        t        | j                  dd            S )a  Whether to use the ``importlib.metadata`` or ``pkg_resources`` backend.

    By default, pip uses ``importlib.metadata`` on Python 3.11+, and
    ``pkg_resourcess`` otherwise. This can be overridden by a couple of ways:

    * If environment variable ``_PIP_USE_IMPORTLIB_METADATA`` is set, it
      dictates whether ``importlib.metadata`` is used, regardless of Python
      version.
    * On Python 3.11+, Python distributors can patch ``importlib.metadata``
      to add a global constant ``_PIP_USE_IMPORTLIB_METADATA = False``. This
      makes pip use ``pkg_resources`` (unless the user set the aforementioned
      environment variable to *True*).
    _PIP_USE_IMPORTLIB_METADATAN)      Fr   T)
contextlibsuppressKeyError
ValueErrorboolr   osenvironsysversion_infoimportlib.metadatagetattrmetadata	importlibs    X/home/api-vastappli/venv/lib/python3.12/site-packages/pip/_internal/metadata/__init__.py_should_use_importlib_metadatar(      ss     
		Xz	2 JIbjj)FGHIJ J J
'!	**,I4PQQs   %AAc                   .    e Zd ZU ee   ed<   ee   ed<   y)BackendDistributionEnvironmentN)__name__
__module____qualname__r   r
   __annotations__r        r'   r*   r*   4   s    '((o&&r2   r*   )maxsizec                  n    t               rddlm}  t        t        |       S ddlm} t        t        |      S )Nr	   r%   )pkg_resources)r(    r&   r   r*   r5   )r&   r5   s     r'   r   r   9   s(    %'GY''''r2   c                  F    t               j                  j                         S )a	  Get the default representation for the current environment.

    This returns an Environment instance from the chosen backend. The default
    Environment instance should be built from ``sys.path`` and may use caching
    to share instance state accorss calls.
    )r   r,   defaultr1   r2   r'   r   r   D   s     ''//11r2   pathsc                 H    t               j                  j                  |       S )a'  Get a representation of the environment specified by ``paths``.

    This returns an Environment instance from the chosen backend based on the
    given import paths. The backend must build a fresh instance representing
    the state of installed distributions when this function is called.
    )r   r,   
from_paths)r9   s    r'   r   r   N   s     ''22599r2   	directoryc                 H    t               j                  j                  |       S )zGet the distribution metadata representation in the specified directory.

    This returns a Distribution instance from the chosen backend based on
    the given on-disk ``.dist-info`` directory.
    )r   r+   from_directory)r<   s    r'   get_directory_distributionr?   X   s     ((77	BBr2   wheelcanonical_namec                 J    t               j                  j                  | |      S )a  Get the representation of the specified wheel's distribution metadata.

    This returns a Distribution instance from the chosen backend based on
    the given wheel's ``.dist-info`` directory.

    :param canonical_name: Normalized project name of the given wheel.
    )r   r+   
from_wheel)r@   rA   s     r'   r   r   a   s      ((33E>JJr2   metadata_contentsfilenamec                 L    t               j                  j                  | ||      S )a  Get the dist representation of the specified METADATA file contents.

    This returns a Distribution instance from the chosen backend sourced from the data
    in `metadata_contents`.

    :param metadata_contents: Contents of a METADATA file within a dist, or one served
                              via PEP 658.
    :param filename: Filename for the dist this metadata represents.
    :param canonical_name: Normalized project name of the given dist.
    )r   r+   from_metadata_file_contents)rD   rE   rA   s      r'   get_metadata_distributionrH   l   s)     ((DD r2   )!r   	functoolsr   r    typingr   r   r   r   r   pip._internal.utils.miscr   baser
   r   r   r   r   r   object__all__r   r(   r*   	lru_cacher   r   strr   r?   r   bytesrH   r1   r2   r'   <module>rR      s      	 
 < < . X XH
R R.'h '
 T"( ( #(2 2:8DI. :? :C# C2B CK% K KAQ K  	r2   