kghdZddlZddlmZmZmZmZddlmZddl m Z m Z ddl m Z ddlm Z ddlmZGdd ZdS) z`Represents a wheel file and provides access to the various parts of the name that have meaning. N)DictIterableListOptionalTag)BuildTagparse_wheel_filename)InvalidWheelFilename) deprecatedceZdZdZejdejZdeddfdZ e de fdZ de efdZd e edefd Zd e ed eeefdefd Zd eedefd ZdS)Wheelz A wheel filez^(?P(?P[^\s-]+?)-(?P[^\s-]*?)) ((-(?P\d[^-]*?))?-(?P[^\s-]+?)-(?P[^\s-]+?)-(?P[^\s-]+?) \.whl|\.dist-info)$filenamereturnNcr||_|d|_ t|}|\|_}|_|_t ||_dS#t$r\}|j |}|st|j ddtd|d|j ddddd| d d d |_| d d d |_| d d}| dd| ddt!fd|D|_Yd}~dSd}~wwxYw)NrzWheel filename zU is not correctly normalised. Future versions of pip will raise the following error: z zvto rename the wheel to use a correctly normalised name (this may require updating the version in the project metadata)z25.3i2)reason replacementgone_inissuename_-verpyver.abiplatc3PK|] }D]}D]}t|||V!dS)) interpreterrplatformNr).0pyrrabisplatss z/builddir/build/BUILD/imunify360-venv-2.6.0/opt/imunify360/venv/lib/python3.11/site-packages/pip/_internal/models/wheel.py z!Wheel.__init__..Dst''''! ''d;;;'''''''')r _build_tagr r file_tagsstrversion_PackagingInvalidWheelFilenamelegacy_wheel_file_rematchr argsr groupreplacesplit frozenset) selfr wheel_info_versionelegacy_wheel_info pyversionsr#r$s @@r%__init__zWheel.__init__s   .2% -h77JCM @DIx$.x==DLLL-! ! !  $ 9 ? ? I I $ @*16!9554? 'h''vay''' ,    *//77??SIIDI,22599AA#sKKDL+0099??DDJ$**51177<>E&'''''$'''DNNNNNNN9! s9A F6EF11F6cZ|j|jS|j|j}| Jd|d}t jd|}| Jd|}t|d|df|_|jS)Nz!guaranteed by filename validationbuildz ^(\d+)(.*)$r)r(r-r.rr0regroupsint)r4r8 build_tagr.build_tag_groupss r%rAzWheel.build_tagKs ? &? "!5;;DMJJ ,,.Q,,,%++G44 33  "E    <<>>/2335Ea5HIr'c>td|jDS)z4Return the wheel's tags as a sorted list of strings.c34K|]}t|VdSN)r*)r!tags r%r&z0Wheel.get_formatted_file_tags..]s(993c#hh999999r')sortedr))r4s r%get_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|VdSrE)r))r!itr4s r%r&z*Wheel.support_index_min..ms3MMdadn9L9L9L9L9L9LMMr')next enumerate StopIteration ValueErrorr4rIs` r%support_index_minzWheel.support_index_min_sV 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|VdSrE)r!rFrTs r%r&z0Wheel.find_most_preferred_tag..s;  %(c_>T>TOC >T>T>T>T  r')minr))r4rIrTs `r%find_most_preferred_tagzWheel.find_most_preferred_tagqs?"    ,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) isdisjointrRs r% supportedzWheel.supporteds >,,T2222r')__name__ __module__ __qualname____doc__r>compileVERBOSEr-r*r:propertyr rArrHrr@rSrrYrboolr\rWr'r%rrs'%2:  ------^ 8   X :c::::d3iC$ I 04S#X     *3hsm3333333r'r)r`r>typingrrrrpip._vendor.packaging.tagsrpip._vendor.packaging.utilsr r r r,pip._internal.exceptionspip._internal.utils.deprecationr rrWr'r%rjs 111111111111******FFFFFFFF:99999666666y3y3y3y3y3y3y3y3y3y3r'