
    жvg                     |    d Z ddlZddlmZmZmZ ddlmZ ddlm	Z
 ddlmZ ddlm	Z	 ddlmZ  G d d	          ZdS )
z`Represents a wheel file and provides access to the various parts of the
name that have meaning.
    N)DictIterableList)Tag)InvalidWheelFilename)parse_wheel_filename)
deprecatedc                       e Zd ZdZ ej        dej                  ZdeddfdZ	de
e         fdZde
e         defd	Zde
e         d
eeef         defdZdee         defdZdS )WheelzA wheel filez^(?P<namever>(?P<name>[^\s-]+?)-(?P<ver>[^\s-]*?))
        ((-(?P<build>\d[^-]*?))?-(?P<pyver>[^\s-]+?)-(?P<abi>[^\s-]+?)-(?P<plat>[^\s-]+?)
        \.whl|\.dist-info)$filenamereturnNc                 F     j                             |          }|st          | d          | _        |                    d                              dd           _        |                    d          }d|v rc	 t          |           n<# t          $ r/}t          d|d|j
        d          d	d
dd           Y d}~nd}~ww xY w|                    dd          }| _        |                    d           _        |                    d                              d           _        |                    d                              d           _        |                    d                              d           _         fd j        D              _        dS )zX
        :raises InvalidWheelFilename: when the filename is invalid for a wheel
        z is not a valid wheel filename.name_-verzWheel filename zU is not correctly normalised. Future versions of pip will raise the following error:
r   z

zvto rename the wheel to use a correctly normalised name (this may require updating the version in the project metadata)z25.1i2  )reasonreplacementgone_inissueNbuildpyver.abiplatc           	      Z    h | ]'}j         D ]}j        D ]}t          |||          (S  )abisplatsr   ).0xyzselfs       W/var/www/pixelcanvas.ch/venv/lib/python3.11/site-packages/pip/_internal/models/wheel.py	<setcomp>z!Wheel.__init__.<locals>.<setcomp>B   s\     
 
 
49
 
67dj
 
IJC1aLL
 
 
 
 
    )wheel_file_rematchr   r   groupreplacer   r   PackagingInvalidWheelNamer	   argsversion	build_tagsplit
pyversionsr   r   	file_tags)r$   r   
wheel_info_versiones   `    r%   __init__zWheel.__init__   s    '--h77
 	U&('S'S'STTT $$V,,44S#>>	##E**(??$X....,   +( + +6!9+ + +
0 #           ''S11H#))'22$**73399#>>$$U++11#66	%%f--33C88

 
 
 
"&/
 
 
s   ?B 
C%CCc                 >    t          d | j        D                       S )z4Return the wheel's tags as a sorted list of strings.c              3   4   K   | ]}t          |          V  d S N)str)r    tags     r%   	<genexpr>z0Wheel.get_formatted_file_tags.<locals>.<genexpr>H   s(      993c#hh999999r'   )sortedr2   )r$   s    r%   get_formatted_file_tagszWheel.get_formatted_file_tagsF   s!    99$.999999r'   tagsc                      	 t           fdt          |          D                       S # t          $ r t                      w xY w)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.
        c              3   4   K   | ]\  }}|j         v |V  d S r9   )r2   )r    itr$   s      r%   r<   z*Wheel.support_index_min.<locals>.<genexpr>X   s3      MMdadn9L9L9L9L9L9LMMr'   )next	enumerateStopIteration
ValueErrorr$   r?   s   ` r%   support_index_minzWheel.support_index_minJ   sV    	MMMMiooMMMMMM 	 	 	,,	s	   '+ Atag_to_priorityc                 D    t          fd| j        D                       S )a  Return 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.
        c              3   0   K   | ]}|v |         V  d S r9   r   )r    r;   rJ   s     r%   r<   z0Wheel.find_most_preferred_tag.<locals>.<genexpr>m   s;       
 
%(c_>T>TOC >T>T>T>T
 
r'   )minr2   )r$   r?   rJ   s     `r%   find_most_preferred_tagzWheel.find_most_preferred_tag\   s?    "  
 
 
 
,0N
 
 
 
 
 	
r'   c                 8    | 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.
        )r2   
isdisjointrH   s     r%   	supportedzWheel.supportedq   s    
 >,,T2222r'   )__name__
__module____qualname____doc__recompileVERBOSEr(   r:   r6   r   r>   r   intrI   r   rN   r   boolrQ   r   r'   r%   r   r      s        BJ	 	
	 M(
 (
 (
 (
 (
 (
T:c : : : :d3i C    $
I
04S#X
	
 
 
 
*3hsm 3 3 3 3 3 3 3r'   r   )rU   rV   typingr   r   r   pip._vendor.packaging.tagsr   pip._vendor.packaging.utilsr   r,   r   pip._internal.exceptionspip._internal.utils.deprecationr	   r   r   r'   r%   <module>r`      s     
			 ' ' ' ' ' ' ' ' ' ' * * * * * *      = < < < < < 9 9 9 9 9 9 6 6 6 6 6 6d3 d3 d3 d3 d3 d3 d3 d3 d3 d3r'   