
    жvgr%                    h   U d dl mZ d dlZd dlZd dlZd dlZd dlZd dlZd dlZd dl	m
Z
mZmZmZ ddlmZmZmZmZ dZdZdZej        d+d            Zd,dZd,dZd-dZ ej        d           Zded<    G d de          Zd.dZd.dZ d.dZ!d/d Z"ej#        d0d!            Z$d1d$Z%d%d&d'd(Z&d2d*Z'dS )3    )annotationsN)	GeneratorIterator
NamedTupleSequence   )EIClassEIDataELFFileEMachinel      ~ i   i   pathstrreturn%Generator[ELFFile | None, None, None]c              #     K   	 t          | d          5 }t          |          V  d d d            d S # 1 swxY w Y   d S # t          t          t          f$ r d V  Y d S w xY w)Nrb)openr   OSError	TypeError
ValueError)r   fs     ]/var/www/pixelcanvas.ch/venv/lib/python3.11/site-packages/pip/_vendor/packaging/_manylinux.py
_parse_elfr      s      $ 	!**	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	Y
+   





s,   A  3A  7A  7A   AA
executableboolc                <   t          |           5 }|d uon|j        t          j        k    oY|j        t
          j        k    oD|j        t          j	        k    o/|j
        t          z  t          k    o|j
        t          z  t          k    	 cd d d            S # 1 swxY w Y   d S N)r   capacityr	   C32encodingr
   Lsbmachiner   ArmflagsEF_ARM_ABIMASKEF_ARM_ABI_VER5EF_ARM_ABI_FLOAT_HARDr   r   s     r   _is_linux_armhfr)      s     
J		 
1TM I
gk)I
fj(I 	X\)I .(O;	I
 //3HH	

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
s   A4BBBc                    t          |           5 }|d uo>|j        t          j        k    o)|j        t
          j        k    o|j        t          j	        k    	 cd d d            S # 1 swxY w Y   d S r   )
r   r   r	   r   r    r
   r!   r"   r   I386r(   s     r   _is_linux_i686r,   -   s    	J		 
1TM +
gk)+
fj(+ 	X]*		

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
s   AA!!A%(A%archsSequence[str]c                    d|v rt          |           S d|v rt          |           S h dt          fd|D                       S )Narmv7li686>   ppc64s390xx86_64aarch64ppc64leriscv64loongarch64c              3      K   | ]}|v V  	d S r    ).0archallowed_archss     r   	<genexpr>z'_have_compatible_abi.<locals>.<genexpr>E   s(      77t}$777777    )r)   r,   any)r   r-   r=   s     @r   _have_compatible_abirA   7   si    5z***j)))  M 7777777777r?   c                     dS )N2   r:   r:   r?   r   <lambda>rD   M   s    B r?   zdict[int, int]_LAST_GLIBC_MINORc                  $    e Zd ZU ded<   ded<   dS )_GLibCVersionintmajorminorN)__name__
__module____qualname____annotations__r:   r?   r   rG   rG   P   s"         JJJJJJJJr?   rG   
str | Nonec                     	 t          j        d          } | J |                                 \  }}n$# t          t          t
          t          f$ r Y dS w xY w|S )zJ
    Primary implementation of glibc_version_string using os.confstr.
    CS_GNU_LIBC_VERSIONN)osconfstrrsplitAssertionErrorAttributeErrorr   r   )version_string_versions      r   _glibc_version_string_confstrrZ   U   sl    %'Z0E%F%F)))#**,,
77NGZ@   tt Ns   /2 AAc                 8   	 ddl } n# t          $ r Y dS w xY w	 |                     d          }n# t          $ r Y dS w xY w	 |j        }n# t
          $ r Y dS w xY w| j        |_         |            }t          |t                    s|
                    d          }|S )zG
    Fallback implementation of glibc_version_string using ctypes.
    r   Nascii)ctypesImportErrorCDLLr   gnu_get_libc_versionrV   c_char_prestype
isinstancer   decode)r]   process_namespacer`   version_strs       r   _glibc_version_string_ctypesrg   h   s       tt "KK--   tt0E    tt $*? ++--Kk3'' 2!((11s*    
/ 
==A	 	
AAc                 :    t                      pt                      S )z9Returns glibc version string, or None if not using glibc.)rZ   rg   r:   r?   r   _glibc_version_stringri      s    (**L.J.L.LLr?   rf   tuple[int, int]c                    t          j        d|           }|st          j        d|  t                     dS t          |                    d                    t          |                    d                    fS )a3  Parse glibc version.

    We use a regexp instead of str.split because we want to discard any
    random junk that might come after the minor version -- this might happen
    in patched/forked versions of glibc (e.g. Linaro's version of glibc
    uses version strings like "2.20-2014.11"). See gh-3588.
    z$(?P<major>[0-9]+)\.(?P<minor>[0-9]+)z;Expected glibc version with 2 components major.minor, got: rm   rI   rJ   )rematchwarningswarnRuntimeWarningrH   group)rf   ms     r   _parse_glibc_versionru      s     	8+FFA # # #	
 	
 	

 vqwww  #aggg&6&6"7"777r?   c                 D    t                      } | dS t          |           S )Nrl   )ri   ru   )rf   s    r   _get_glibc_versionrw      s&    '))Kx,,,r?   r<   rY   c                <   t                      }||k     rdS 	 dd l}n# t          $ r Y dS w xY wt          |d          r6|                    |d         |d         |           }|t          |          S dS |t          dd          k    r$t          |d          rt          |j                  S |t          dd	          k    r$t          |d
          rt          |j                  S |t          dd          k    r$t          |d          rt          |j	                  S dS )NFr   Tmanylinux_compatibler         manylinux1_compatible   manylinux2010_compatible   manylinux2014_compatible)
rw   
_manylinuxr^   hasattrry   r   rG   r|   r~   r   )r<   rY   	sys_glibcr   results        r   _is_compatibler      sL   "$$I7u   ttz122 00WQZNN<<t-1%%%%:677 	:
8999-2&&&&:9:: 	=
;<<<-2&&&&:9:: 	=
;<<<4s    
++manylinux2014manylinux2010
manylinux1))rz   r   )rz   r}   )rz   r{   Iterator[str]c              #    K   t          t          j        |           sdS t          dd          }t	          |           ddhz  rt          dd          }t          t                       }|g}t          |j        dz
  dd          D ]2}t          |         }|	                    t          ||                     3| D ]}|D ]}|j        |j        k    r|j
        }nd}t          |j
        |d          D ]i}t          |j        |          }	 d	j        |	 }
t          ||	          r	|
 d
| V  |	t          v r&t          |	         }t          ||	          r	| d
| V  jdS )a  Generate manylinux tags compatible to the current platform.

    :param archs: Sequence of compatible architectures.
        The first one shall be the closest to the actual architecture and be the part of
        platform tag after the ``linux_`` prefix, e.g. ``x86_64``.
        The ``linux_`` prefix is assumed as a prerequisite for the current platform to
        be manylinux-compatible.

    :returns: An iterator of compatible manylinux tags.
    Nrz      r4   r1      r   rm   zmanylinux_{}_{}rX   )rA   sysr   rG   setrw   rangerI   rE   appendrJ   formatr   _LEGACY_MANYLINUX_MAP)r-   too_old_glibc2current_glibcglibc_max_listglibc_majorglibc_minorr<   	glibc_max	min_minorglibc_versiontag
legacy_tags               r   platform_tagsr      s       66 "1b))N
5zzXv&& -&q!,,!#5#7#78M#_N ]014a<< G G'4mKEEFFFF 5 5' 	5 	5I."666*0		 	$Y_iDD 	5 	5 -io{ K K.'.>!$66 * //4//))) $999!6}!EJ%dM:: 5!+44d44444	5	55 5r?   )r   r   r   r   )r   r   r   r   )r   r   r-   r.   r   r   )r   rO   )rf   r   r   rj   )r   rj   )r<   r   rY   rG   r   r   )r-   r.   r   r   )(
__future__r   collections
contextlib	functoolsrR   rn   r   rp   typingr   r   r   r   _elffiler	   r
   r   r   r%   r&   r'   contextmanagerr   r)   r,   rA   defaultdictrE   rN   rG   rZ   rg   ri   ru   	lru_cacherw   r   r   r   r:   r?   r   <module>r      s*   " " " " " " "             				 				 



  < < < < < < < < < < < < 8 8 8 8 8 8 8 8 8 8 8 8" 
    
 
 
 

 
 
 
8 8 8 8, %<K$;JJ$G$G  G G G G    J   
   &) ) ) )XM M M M
8 8 8 8& - - - -   8   -5 -5 -5 -5 -5 -5r?   