\bg^ddlZddlZddlZddlZddlmZmZmZmZm Z ddl m Z ddl m Z mZmZmZmZer ddlmZmZneZgdZdefd ZGd d eZejd defd ZdefdZdeeedefdZdede fdZdedede fdZde dedede fdZ!dS)N) TYPE_CHECKINGListOptionalTypecast) strtobool)BaseDistributionBaseEnvironmentFilesystemWheel MemoryWheelWheel)LiteralProtocol) r r r r rget_default_environmentget_environmentget_wheel_distributionselect_backendreturnc:tjtt5t t t jdcdddS#1swxYwYtj dkrdSddl }t t|j ddS)aWhether 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) FrT) contextlibsuppressKeyError ValueErrorboolrosenvironsys version_infoimportlib.metadatagetattrmetadata importlibs p/builddir/build/BUILD/cloudlinux-venv-1.0.7/venv/lib/python3.11/site-packages/pip/_internal/metadata/__init__.py_should_use_importlib_metadatar)s  Xz 2 2JJIbj)FGHHIIJJJJJJJJJJJJJJJJ '!!u  *,I4PP Q QQs,AA AcFeZdZUded<eeed<eeed<dS)Backendz%Literal["importlib", "pkg_resources"]NAME Distribution EnvironmentN)__name__ __module__ __qualname____annotations__rr r r(r+r+4sA 1111'((((o&&&&&&r4r+)maxsizectrddlm}tt|Sddlm}tt|S)Nr r&) pkg_resources)r)r'rr+r7)r'r7s r(rr:sT%''(GY'''  ' ''r4cLtjS)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. )rr.defaultr3r4r(rrEs    ' / / 1 11r4pathscNtj|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. )rr. from_paths)r;s r(rrOs!    ' 2 25 9 99r4 directorycNtj|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. )rr-from_directory)r>s r(get_directory_distributionrAYs!    ( 7 7 B BBr4wheelcanonical_namecPtj||S)aGet 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. )rr- from_wheel)rBrCs r(rrbs#    ( 3 3E> J JJr4metadata_contentsfilenamecRtj|||S)aGet 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. )rr-from_metadata_file_contents)rFrGrCs r(get_metadata_distributionrJms.    ( D D  r4)"r functoolsrr!typingrrrrrpip._internal.utils.miscrbaser r r r rrrobject__all__rr)r+ lru_cacherrstrrrArbytesrJr3r4r(rTs2 <<<<<<<<<<<<<<......XXXXXXXXXXXXXX(((((((((H   RRRRR.'''''h''' T"""((((#"(22222:8DI.:?::::C#C2BCCCCK%KKAQKKKK r4