3 ”ReÔ ã@sTdZddlZddlmZddlmZddlmZer@ddlm Z Gdd„de ƒ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>eZdZdZejdejƒZdd„Zdd„Z dd„Z d d „Z d S) ÚWheelz A wheel filez�^(?P(?P.+?)-(?P.*?)) ((-(?P\d[^-]*?))?-(?P.+?)-(?P.+?)-(?P.+?) \.whl|\.dist-info)$cs¨ˆjj|ƒ}|stdj|ƒƒ‚|ˆ_|jdƒjddƒˆ_|jdƒjddƒˆ_|jdƒˆ_ |jdƒj 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Ú_ú-ÚverÚbuildÚpyverÚ.ÚabiÚplatcs0h|](}ˆjD]}ˆjD]}t|||ƒ’qqqS©)ÚabisÚplatsr)Ú.0ÚxÚyÚz)Úselfrú‰/builddir/build/BUILDROOT/alt-python36-pip-20.2.4-5.el8.x86_64/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/models/wheel.pyú .sz!Wheel.__init__..N)Ú wheel_file_reÚmatchrÚformatÚfilenameÚgroupÚreplacerÚversionÚ build_tagÚsplitÚ pyversionsrrÚ file_tags)rrÚ wheel_infor)rrÚ__init__s    zWheel.__init__cCstdd„|jDƒƒS)z4Return the wheel's tags as a sorted list of strings.css|]}t|ƒVqdS)N)Ústr)rÚtagrrrú 6sz0Wheel.get_formatted_file_tags..)Úsortedr$)rrrrÚget_formatted_file_tags3szWheel.get_formatted_file_tagscst‡fdd„|jDƒƒS)aÜReturn 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 |]}|ˆkrˆj|ƒVqdS)N)Úindex)rr()Útagsrrr)Fsz*Wheel.support_index_min..)Úminr$)rr-r)r-rÚsupport_index_min8szWheel.support_index_mincCs|jj|ƒ S)zŽReturn 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__ÚreÚcompileÚVERBOSErr&r+r/r1rrrrrsr) r5r6Úpip._vendor.packaging.tagsrÚpip._internal.exceptionsrÚpip._internal.utils.typingrÚtypingrÚobjectrrrrrÚs