kgh[\ddlZddlZddlZddlZddlmZmZmZmZm Z m Z ddl m Z ddl mZddlmZmZmZmZmZgdZdefd Zdd ZGd d eZejd defdZdefdZdeeedefdZdedefdZdededefdZ de!dededefdZ"dS)N)ListLiteralOptionalProtocolTypecast) deprecated) strtobool)BaseDistributionBaseEnvironmentFilesystemWheel MemoryWheelWheel) r r rrrget_default_environmentget_environmentget_wheel_distributionselect_backendreturnc^tjdkrdStjtt 5t ttj dcdddS#1swxYwYtjdkrdSddl }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_resources`` otherwise. Up to Python 3.13, 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, for Python <3.14. * On Python 3.11, 3.12 and 3.13, 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*). On Python 3.14+, the ``pkg_resources`` backend cannot be used. )T_PIP_USE_IMPORTLIB_METADATANr Fr) sys version_info contextlibsuppressKeyError ValueErrorboolr osenvironimportlib.metadatagetattrmetadata importlibs /builddir/build/BUILD/imunify360-venv-2.6.0/opt/imunify360/venv/lib/python3.11/site-packages/pip/_internal/metadata/__init__.py_should_use_importlib_metadatar+s" 7""t  Xz 2 2JJIbj)FGHHIIJJJJJJJJJJJJJJJJ '!!u  *,I4PP Q QQs,A++A/2A/ctjdkrdSddl}t|jdrdSt dddddS) Nrrrz7Using the pkg_resources metadata backend is deprecated.zpto use the default importlib.metadata backend, by unsetting the _PIP_USE_IMPORTLIB_METADATA environment variablez26.3i4)reason replacementgone_inissue)rrr%hasattrr'r r(s r*)_emit_pkg_resources_deprecation_if_neededr2:st '!! y!#@AA H PcFeZdZUded<eeed<eeed<dS)Backendz%Literal["importlib", "pkg_resources"]NAME Distribution EnvironmentN)__name__ __module__ __qualname____annotations__rr r r3r*r5r5SsA 1111'((((o&&&&&&r3r5)maxsizectrddlm}tt|St ddlm}tt|S)Nr r() pkg_resources)r+r)rr5r2r@)r)r@s r*rrYs`%''(GY'''-///  ' ''r3cLtjS)aGet 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 across calls. )rr8defaultr=r3r*rrgs    ' / / 1 11r3pathscNtj|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. )rr8 from_paths)rDs r*rrqs!    ' 2 25 9 99r3 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. )rr7from_directory)rGs r*get_directory_distributionrJ{s!    ( 7 7 B BBr3wheelcanonical_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. )rr7 from_wheel)rKrLs r*rrs#    ( 3 3E> J JJr3metadata_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. )rr7from_metadata_file_contents)rOrPrLs r*get_metadata_distributionrSs.    ( D D  r3)rN)#r functoolsr#rtypingrrrrrrpip._internal.utils.deprecationr pip._internal.utils.miscr baser r rrr__all__r"r+r2r5 lru_cacherrstrrrJrbytesrSr=r3r*r]s7 @@@@@@@@@@@@@@@@666666......XXXXXXXXXXXXXX   RRRRRB2'''''h''' T""" ( ( ( (#" (22222:8DI.:?::::C#C2BCCCCK%KKAQKKKK r3