hf"JUddlZddlZddlZddlZddlZddlZddlZddlmZm Z m Z m Z m Z m Z ddlmZmZmZmZdZdZdZejded e e eddffd Zd ed efd Zd ed efd Zd eded efdZejdZeeefe d<Gdde Z!d e efdZ"d e efdZ#d e efdZ$ded e eeffdZ%ej&d e eeffdZ'dedede!d efdZ(dddd Z)d!eded e efd"Z*dS)#N)Dict GeneratorIterator NamedTupleOptionalTuple)EIClassEIDataELFFileEMachinel~iipathreturnc#K t|d5}t|VddddS#1swxYwYdS#tttf$rdVYdSwxYw)Nrb)openr OSError TypeError ValueError)rfs t/builddir/build/BUILD/imunify360-venv-2.3.5/opt/imunify360/venv/lib/python3.11/site-packages/packaging/_manylinux.py _parse_elfrs $   !**                      Y + s,A3 A7A7AAA executablec<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 rrr rr r I386r&s r_is_linux_i686r*+s J   1 TM + gk) + fj( + X]*                    sAA!!A%(A%archc^|dkrt|S|dkrt|S|dvS)Narmv7li686>ppc64s390xx86_64aarch64ppc64le)r'r*)rr+s r_have_compatible_abir45s> xz*** v~~j))) E EEcdS)N2r8r5rr9BsBr5_LAST_GLIBC_MINORc$eZdZUeed<eed<dS) _GLibCVersionmajorminorN)__name__ __module__ __qualname__int__annotations__r8r5rr<r<Es" JJJ JJJJJr5r<c ttdd}|J|\}}n$#ttt t f$rYdSwxYw|S)zJ Primary implementation of glibc_version_string using os.confstr. confstrCS_GNU_LIBC_VERSIONN)getattrosrsplitAssertionErrorAttributeErrorrr)version_string_versions r_glibc_version_string_confstrrOJsv4gb)445JKK)))#**,, 77 NGZ @tt Ns9<AAc8 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_versionrKc_char_prestype isinstancestrdecode)rRprocess_namespacerU version_strs r_glibc_version_string_ctypesr]]s tt "KK-- tt0E tt $*? ++--K k3 ' '2!((11 s* / ==A AAc:tp tS)z9Returns glibc version string, or None if not using glibc.)rOr]r8r5r_glibc_version_stringr_s ( * * L.J.L.LLr5r\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: rbr=r>)rematchwarningswarnRuntimeWarningrBgroup)r\ms r_parse_glibc_versionrjs 8+FFA   #  # #    v qwww #aggg&6&6"7"7 77r5cDt}|dSt|S)Nra)r_rj)r\s r_get_glibc_versionrls&'))Kx  , ,,r5namerNc<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_compatibler manylinux1_compatible manylinux2010_compatiblemanylinux2014_compatible) rl _manylinuxrShasattrroboolr<rrrtrv)rmr+rN sys_glibcrwresults r_is_compatibler|sL"$$I7u ttz12200WQZNN  << t-1%%%% :6 7 7 : 899 9-2&&&& :9 : : = ;<< <-2&&&& :9 : : = ;<< < 4s  ++ manylinux2014 manylinux2010 manylinux1))rpru)rprs)rprqlinuxc#Kttj|sdStdd}|dvrtdd}tt }|g}t |jdz ddD]2}t|}|t||3|D]}|j|jkr|j }nd}t |j |dD]}t|j|} dj | } t| || r| d| V| tvr6t| } t| || r| d| VdS) Nrp>r.r1r rbzmanylinux_{}_{}r)r4sysrr<rlranger=r:appendr>formatr|replace_LEGACY_MANYLINUX_MAP) rr+too_old_glibc2 current_glibcglibc_max_list glibc_major glibc_minor glibc_max min_minor glibc_versiontag legacy_tags r platform_tagsrs  5 5"1b))N !!!&q!,,!#5#7#78M#_N]014a<<GG ' 4 mKEEFFFF#== ?n2 2 2&,III )R@@ = =K))/;GGM*#*M:Cc477 2mmGS11111 5552=A !*dMBB=--<<<<< = ==r5)+ collections contextlib functoolsrHrcrretypingrrrrrr_elffiler r r r r#r$r%contextmanagerrYrryr'r*r4 defaultdictr:rBrCr<rOr]r_rj lru_cacherlr|rrr8r5rrs IIIIIIIIIIIIIIII888888888888"  SYx'8$'DE          s t    FSFFFFFF%GGGJ x}&)hsm))))XMx}MMMM 8c8eCHo8888&-E#s(O----C-D8   "="=C"=HSM"="="="="="=r5