7fXdZddlZddlmZmZmZddlmZddlm Z GddZ dS)z`Represents a wheel file and provides access to the various parts of the name that have meaning. N)DictIterableList)Tag)InvalidWheelFilenameceZdZdZejdejZdeddfdZ 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)$filenamereturnNcj|}|st|d|_|ddd_|ddd_|d_|d d_ |d  d_ |d  d_ fd j D_ d S) zX :raises InvalidWheelFilename: when the filename is invalid for a wheel z is not a valid wheel filename.name_-verbuildpyver.abiplatc Zh|]'}jD]}jD]}t|||(S)abisplatsr).0xyzselfs z/builddir/build/BUILD/imunify360-venv-2.3.5/opt/imunify360/venv/lib/python3.11/site-packages/pip/_internal/models/wheel.py z!Wheel.__init__..)s\   49  67dj  IJC1aLL     N) wheel_file_rematchrr groupreplacer version build_tagsplit pyversionsrr file_tags)rr wheel_infos` r__init__zWheel.__init__s<'--h77  U&('S'S'STT T  $$V,,44S#>> "''..66sC@@ #))'22$**73399#>>$$U++11#66 %%f--33C88     "&/   r!c>td|jDS)z4Return the wheel's tags as a sorted list of strings.c34K|]}t|VdSN)str)rtags r z0Wheel.get_formatted_file_tags../s(993c#hh999999r!)sortedr*)rs rget_formatted_file_tagszWheel.get_formatted_file_tags-s!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|VdSr/)r*)ritrs rr2z*Wheel.support_index_min..?s3MMdadn9L9L9L9L9L9LMMr!)next enumerate StopIteration ValueErrorrr5s` rsupport_index_minzWheel.support_index_min1sV 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|VdSr/r)rr1r@s rr2z0Wheel.find_most_preferred_tag..Ts;  %(c_>T>TOC >T>T>T>T  r!)minr*)rr5r@s `rfind_most_preferred_tagzWheel.find_most_preferred_tagCs?"    ,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. )r* isdisjointr>s r supportedzWheel.supportedXs >,,T2222r!)__name__ __module__ __qualname____doc__recompileVERBOSEr"r0r,rr4rintr?rrDrboolrGrr!rr r sBJ  M      ,:c::::d3iC$ I 04S#X     *3hsm3333333r!r ) rKrLtypingrrrpip._vendor.packaging.tagsrpip._internal.exceptionsrr rr!rrTs ''''''''''******999999P3P3P3P3P3P3P3P3P3P3r!