Viewing File: /opt/alt/python35/lib/python3.5/site-packages/pip/_internal/models/__pycache__/wheel.cpython-35.pyc



t_
@srdZddlZddlmZddlmZddlmZerXddlm	Z	Gddde
ZdS)	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
ZdS)WheelzA wheel filez^(?P<namever>(?P<name>.+?)-(?P<ver>.*?))
        ((-(?P<build>\d[^-]*?))?-(?P<pyver>.+?)-(?P<abi>.+?)-(?P<plat>.+?)
        \.whl|\.dist-info)$csjj|}|s-tdj||_|jdjdd_|jdjdd_|jd_	|jdj
d_|jd	j
d_|jd
j
d_
fddjD_d
S)zX
        :raises InvalidWheelFilename: when the filename is invalid for a wheel
        z!{} is not a valid wheel filename.name_-verbuildpyver.abiplatcsBh|]8}jD](}jD]}t|||q qqS)abisplatsr).0xyz)selfr/builddir/build/BUILDROOT/alt-python35-pip-20.2.4-1.el7.x86_64/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/models/wheel.py	<setcomp>.s	z!Wheel.__init__.<locals>.<setcomp>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	<genexpr>6sz0Wheel.get_formatted_file_tags.<locals>.<genexpr>)sortedr$)rrrrget_formatted_file_tags3szWheel.get_formatted_file_tagscs tfdd|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.<locals>.<genexpr>)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/r1rrrrrsr)r5r6pip._vendor.packaging.tagsrpip._internal.exceptionsrpip._internal.utils.typingrtypingrobjectrrrrr<module>s
Back to Directory File Manager