h|dZddlZddlmZmZmZddlmZddlm Z ddlm Z ddl m Z ddl mZGdd ZdS) z`Represents a wheel file and provides access to the various parts of the name that have meaning. N)DictIterableList)Tag)InvalidWheelFilename)parse_wheel_filename) deprecatedceZdZdZejdejZdeddfdZ de efdZ de e de fd Zde e d ee e fde fd Zdee defd ZdS) Wheelz A wheel filez^(?P(?P[^\s-]+?)-(?P[^\s-]*?)) ((-(?P\d[^-]*?))?-(?P[^\s-]+?)-(?P[^\s-]+?)-(?P[^\s-]+?) \.whl|\.dist-info)$filenamereturnNcFj|}|st|d|_|ddd_|d}d|vrc t|n<#t$r/}td|d|j dd d d d Yd}~nd}~wwxYw|dd}|_ |d_ |d d_|d d_|d d_fdjD_dS)zX :raises InvalidWheelFilename: when the filename is invalid for a wheel z is not a valid wheel filename.name_-verzWheel filename zU is not correctly normalised. Future versions of pip will raise the following error: rz zvto rename the wheel to use a correctly normalised name (this may require updating the version in the project metadata)z25.1i2)reason replacementgone_inissueNbuildpyver.abiplatc Zh|]'}jD]}jD]}t|||(S)abisplatsr).0xyzselfs z/builddir/build/BUILD/imunify360-venv-2.5.2/opt/imunify360/venv/lib/python3.11/site-packages/pip/_internal/models/wheel.py z!Wheel.__init__..Bs\   49  67dj  IJC1aLL     ) wheel_file_rematchrr groupreplacerrPackagingInvalidWheelNamer argsversion build_tagsplit pyversionsrr file_tags)r$r wheel_info_versiones` r%__init__zWheel.__init__s'--h77  U&('S'S'STT T  $$V,,44S#>> ##E** (?? $X....,   +(++6!9+++ 0#            ''S11H #))'22$**73399#>>$$U++11#66 %%f--33C88     "&/   s?B C%CCc>td|jDS)z4Return the wheel's tags as a sorted list of strings.c34K|]}t|VdSN)str)r tags r% z0Wheel.get_formatted_file_tags..Hs(993c#hh999999r')sortedr2)r$s r%get_formatted_file_tagszWheel.get_formatted_file_tagsFs!99$.999999r'tagsc tfdt|DS#t$rtwxYw)aReturn the lowest index that one of the wheel's file_tag combinations achieves in the given list of supported tags. For example, if there are 8 supported tags and one of the file tags is first in the list, then return 0. :param tags: the PEP 425 tags to check the wheel against, in order with most preferred first. :raises ValueError: If none of the wheel's file tags match one of the supported tags. c34K|]\}}|jv|VdSr9)r2)r itr$s r%r<z*Wheel.support_index_min..Xs3MMdadn9L9L9L9L9L9LMMr')next enumerate StopIteration ValueErrorr$r?s` r%support_index_minzWheel.support_index_minJsV MMMMiooMMMMM M   ,,  s '+Atag_to_prioritycDtfd|jDS)aReturn the priority of the most preferred tag that one of the wheel's file tag combinations achieves in the given list of supported tags using the given tag_to_priority mapping, where lower priorities are more-preferred. This is used in place of support_index_min in some cases in order to avoid an expensive linear scan of a large list of tags. :param tags: the PEP 425 tags to check the wheel against. :param tag_to_priority: a mapping from tag to priority of that tag, where lower is more preferred. :raises ValueError: If none of the wheel's file tags match one of the supported tags. c30K|]}|v|VdSr9r)r r;rJs r%r<z0Wheel.find_most_preferred_tag..ms;  %(c_>T>TOC >T>T>T>T  r')minr2)r$r?rJs `r%find_most_preferred_tagzWheel.find_most_preferred_tag\s?"    ,0N      r'c8|j| S)zReturn whether the wheel is compatible with one of the given tags. :param tags: the PEP 425 tags to check the wheel against. )r2 isdisjointrHs r% supportedzWheel.supportedqs >,,T2222r')__name__ __module__ __qualname____doc__recompileVERBOSEr(r:r6rr>rintrIrrNrboolrQrr'r%r r sBJ  M( ( ( ( ( ( T:c::::d3iC$ I 04S#X     *3hsm3333333r'r )rUrVtypingrrrpip._vendor.packaging.tagsrpip._vendor.packaging.utilsrr,rpip._internal.exceptionspip._internal.utils.deprecationr r rr'r%r`s ''''''''''******=<<<<<999999666666d3d3d3d3d3d3d3d3d3d3r'