3 Re @sTdZddlZddlmZddlmZddlmZer@ddlm Z Gddde Z dS) z`Represents a wheel file and provides access to the various parts of the name that have meaning. N)Tag)InvalidWheelFilename)MYPY_CHECK_RUNNING)Listc@s>eZdZdZejdejZddZddZ ddZ d d Z d S) Wheelz A wheel filez^(?P(?P.+?)-(?P.*?)) ((-(?P\d[^-]*?))?-(?P.+?)-(?P.+?)-(?P.+?) \.whl|\.dist-info)$csjj|}|stdj||_|jdjdd_|jdjdd_|jd_ |jdj d_ |jd j d_ |jd j d_ fd d j D_d S)zX :raises InvalidWheelFilename: when the filename is invalid for a wheel z!{} is not a valid wheel filename.name_-verbuildpyver.abiplatcs0h|](}jD]}jD]}t|||qqqS)abisplatsr).0xyz)selfr/builddir/build/BUILDROOT/alt-python36-pip-20.2.4-5.el9.x86_64/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/models/wheel.py .sz!Wheel.__init__..N) wheel_file_rematchrformatfilenamegroupreplacerversion build_tagsplit pyversionsrr file_tags)rr wheel_infor)rr__init__s    zWheel.__init__cCstdd|jDS)z4Return the wheel's tags as a sorted list of strings.css|]}t|VqdS)N)str)rtagrrr 6sz0Wheel.get_formatted_file_tags..)sortedr$)rrrrget_formatted_file_tags3szWheel.get_formatted_file_tagscstfdd|jDS)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. c3s |]}|krj|VqdS)N)index)rr()tagsrrr)Fsz*Wheel.support_index_min..)minr$)rr-r)r-rsupport_index_min8szWheel.support_index_mincCs|jj| 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$ isdisjoint)rr-rrr supportedHszWheel.supportedN) __name__ __module__ __qualname____doc__recompileVERBOSErr&r+r/r1rrrrrsr) r5r6pip._vendor.packaging.tagsrpip._internal.exceptionsrpip._internal.utils.typingrtypingrobjectrrrrrs