8fr%hUddlmZddlZddlZddlZddlZddlZddlZddlZddl m Z m Z m Z m Z ddlmZmZmZmZdZdZdZejd+d Zd,dZd,dZd-dZejdZded<Gdde Zd.dZd.dZ d.dZ!d/d Z"ej#d0d!Z$d1d$Z%d%d&d'd(Z&d2d*Z'dS)3) annotationsN) GeneratorIterator NamedTupleSequence)EIClassEIDataELFFileEMachinel~iipathstrreturn%Generator[ELFFile | None, None, None]c#K t|d5}t|VddddS#1swxYwYdS#tttf$rdVYdSwxYw)Nrb)openr OSError TypeError ValueError)r fs /builddir/build/BUILD/imunify360-venv-2.3.5/opt/imunify360/venv/lib/python3.11/site-packages/pip/_vendor/packaging/_manylinux.py _parse_elfrs $   !**                      Y + s,A3 A7A7AAA executableboolc<t|5}|duon|jtjkoY|jt jkoD|jtj ko/|j tztko|j tztk cdddS#1swxYwYdSN)rcapacityr C32encodingr Lsbmachiner ArmflagsEF_ARM_ABIMASKEF_ARM_ABI_VER5EF_ARM_ABI_FLOAT_HARDrrs r_is_linux_armhfr)s J   1 TM I gk) I fj( I X\) I.(O;  I //3HH                    sA4BBBct|5}|duo>|jtjko)|jt jko|jtj k cdddS#1swxYwYdSr) rrr rr r r!r"r I386r(s r_is_linux_i686r,-s J   1 TM + gk) + fj( + X]*                    sAA!!A%(A%archs Sequence[str]cd|vrt|Sd|vrt|Shdtfd|DS)Narmv7li686>ppc64s390xx86_64aarch64ppc64leriscv64 loongarch64c3 K|]}|vV dSr).0arch allowed_archss r z'_have_compatible_abi..Es(77t}$777777)r)r,any)rr-r=s @r_have_compatible_abirA7si5z*** j)))M 7777777 7 77r?cdS)N2r:r:r?rrDMsBr?zdict[int, int]_LAST_GLIBC_MINORc$eZdZUded<ded<dS) _GLibCVersionintmajorminorN)__name__ __module__ __qualname____annotations__r:r?rrGrGPs"JJJJJJJJr?rG str | Nonec tjd}|J|\}}n$#ttt t f$rYdSwxYw|S)zJ Primary implementation of glibc_version_string using os.confstr. CS_GNU_LIBC_VERSIONN)osconfstrrsplitAssertionErrorAttributeErrorrr)version_string_versions r_glibc_version_string_confstrrZUsl%'Z0E%F%F)))#**,, 77 NGZ @tt Ns/2AAc8 ddl}n#t$rYdSwxYw |d}n#t$rYdSwxYw |j}n#t $rYdSwxYw|j|_|}t|ts| d}|S)zG Fallback implementation of glibc_version_string using ctypes. rNascii) ctypes ImportErrorCDLLrgnu_get_libc_versionrVc_char_prestype isinstancerdecode)r]process_namespacer` version_strs r_glibc_version_string_ctypesrghs tt "KK-- tt0E tt $*? ++--K k3 ' '2!((11 s* / ==A AAc:tp tS)z9Returns glibc version string, or None if not using glibc.)rZrgr:r?r_glibc_version_stringris ( * * L.J.L.LLr?rftuple[int, int]ctjd|}|stjd|tdSt |dt |dfS)a3Parse 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[0-9]+)\.(?P[0-9]+)z;Expected glibc version with 2 components major.minor, got: rmrIrJ)rematchwarningswarnRuntimeWarningrHgroup)rfms r_parse_glibc_versionrus 8+FFA   #  # #    v qwww #aggg&6&6"7"7 77r?cDt}|dSt|S)Nrl)riru)rfs r_get_glibc_versionrws&'))Kx  , ,,r?r<rYc<t}||krdS ddl}n#t$rYdSwxYwt|dr6||d|d|}|t |SdS|t ddkr$t|drt |jS|t dd kr$t|d rt |jS|t dd kr$t|d rt |j SdS) NFrTmanylinux_compatiblermanylinux1_compatible manylinux2010_compatiblemanylinux2014_compatible) rw _manylinuxr^hasattrryrrGr|r~r)r<rY sys_glibcrresults r_is_compatiblersL"$$I7u ttz12200WQZNN  << t-1%%%% :6 7 7 : 899 9-2&&&& :9 : : = ;<< <-2&&&& :9 : : = ;<< < 4s  ++ manylinux2014 manylinux2010 manylinux1))rzr)rzr})rzr{ Iterator[str]c#Kttj|sdStdd}t |ddhzrtdd}tt }|g}t |jdz ddD]2}t|}| t||3|D]}|D]}|j|jkr|j }nd}t |j |dD]i}t|j|} d j | } t|| r | d |V| tvr&t| } t|| r | d |VjdS) aGenerate 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. Nrzr4r1rrmzmanylinux_{}_{}rX)rAsysrrGsetrwrangerIrEappendrJformatr_LEGACY_MANYLINUX_MAP) r-too_old_glibc2 current_glibcglibc_max_list glibc_major glibc_minorr< glibc_max min_minor glibc_versiontag legacy_tags r platform_tagsrs  6 6"1b))N 5zzXv&&-&q!,,!#5#7#78M#_N]014a<<GG ' 4 mKEEFFFF55' 5 5I."666*0  $Y_iDD 5 5 -io{ K K .'. >!$ 66* //4//))) $999!6}!EJ%dM::5!+44d44444 5  555r?)r rrr)rrrr)rrr-r.rr)rrO)rfrrrj)rrj)r<rrYrGrr)r-r.rr)( __future__r collections contextlib functoolsrRrnrrptypingrrrr_elffiler r r r r%r&r'contextmanagerrr)r,rA defaultdictrErNrGrZrgriru lru_cacherwrrrr:r?rrs*""""""" <<<<<<<<<<<<888888888888"           8888,%