\hHddlZddlZddlZddlZddlmZmZmZmZm Z ddl m Z ddl m Z mZmZmZmZer ddlmZmZneZgdZdefd ZGd d eZej2d defd ZdefdZdeeedefdZdede fdZdedede fdZde dedede fdZ!y)N) TYPE_CHECKINGListOptionalTypecast) strtobool)BaseDistributionBaseEnvironmentFilesystemWheel MemoryWheelWheel)LiteralProtocol) r r r r rget_default_environmentget_environmentget_wheel_distributionselect_backendreturnc$tjtt5t t t jdcdddS#1swYnxYwtjdkryddl }t t|jddS)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 b/root/niggaflix-v3/playground/venv/lib/python3.12/site-packages/pip/_internal/metadata/__init__.py_should_use_importlib_metadatar)ss   Xz 2JIbjj)FGHIJJJ '!  **,I4P QQs %AAc8eZdZUded<eeed<eeed<y)Backendz%Literal["importlib", "pkg_resources"]NAME Distribution EnvironmentN)__name__ __module__ __qualname____annotations__rr r r(r+r+4s 11'((o&&r4r+)maxsizecntrddlm}tt|Sddlm}tt|S)Nr r&) pkg_resources)r)r'rr+r7)r'r7s r(rr:s(%'GY''  ''r4cFtjjS)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   ' ' / / 11r4pathscHtjj|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 99r4 directorycHtjj|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 BBr4wheelcanonical_namecJtjj||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> JJr4metadata_contentsfilenamecLtjj|||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(rTs <<.XX((H RR.'h' T"((#(22:8DI.:?:C#C2BCK%KKAQK r4