ih ldZddlmZddlmZddlmZddlmZ ddlm Z ddl mZGddZ d S) z`Represents a wheel file and provides access to the various parts of the name that have meaning. ) annotations)Iterable)Tag)InvalidWheelFilename)parse_wheel_filenamec:eZdZdZddZddZdd ZddZddZdS)Wheelz A wheel filefilenamestrreturnNonec||_ t|}n-#t$r }t|jddd}~wwxYw|\|_}|_|_t||_ dS)Nr) r r_PackagingInvalidWheelFilenamerargsname build_tag file_tagsr version)selfr wheel_infoe_versions z/builddir/build/BUILD/imunify360-venv-2.6.2/opt/imunify360/venv/lib/python3.11/site-packages/pip/_internal/models/wheel.py__init__zWheel.__init__sz   <-h77JJ- < < <&qvay11t ; <?I; 8T^T^8}} s A>A list[str]c>td|jDS)z4Return the wheel's tags as a sorted list of strings.c34K|]}t|VdSN)r ).0tags r z0Wheel.get_formatted_file_tags.."s(993c#hh999999)sortedr)rs rget_formatted_file_tagszWheel.get_formatted_file_tags s!99$.999999r"tags list[Tag]intc 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 rr!z*Wheel.support_index_min..2s3MMdadn9L9L9L9L9L9LMMr")next enumerate StopIteration ValueErrorrr%s` rsupport_index_minzWheel.support_index_min$sV MMMMiooMMMMM M   ,,  s '+Atag_to_prioritydict[Tag, int]cDtfd|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)rr r2s rr!z0Wheel.find_most_preferred_tag..Gs;  %(c_>T>TOC >T>T>T>T  r")minr)rr%r2s `rfind_most_preferred_tagzWheel.find_most_preferred_tag6s?"    ,0N      r" Iterable[Tag]boolc8|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 isdisjointr0s r supportedzWheel.supportedKs >,,T2222r"N)r r r r )r r)r%r&r r')r%r&r2r3r r')r%r9r r:) __name__ __module__ __qualname____doc__rr$r1r8r=r6r"rr r s~ % % % %::::$    *333333r"r N) rA __future__rcollections.abcrpip._vendor.packaging.tagsrpip._vendor.packaging.utilsrrrpip._internal.exceptionsr r6r"rrGs#"""""$$$$$$******=<<<<<999999>3>3>3>3>3>3>3>3>3>3r"