mò ©ËŽGc@sdkTdkZdkZdefd„ƒYZdefd„ƒYZdefd„ƒYZdefd „ƒYZd efd „ƒYZd „Z d efd„ƒYZ de fd„ƒYZ de fd„ƒYZ de fd„ƒYZ de fd„ƒYZdS((t*Nt GccBinaryEQcBsbtZdZdZdZd„Zd„Zd„Zd„Zd„Z d „Z d „Z d „Z RS( Nsgcc binary gcc versionsGcc Binary Gcc Versions test the gcc version of a binarycCs||_||_d|_dS(Nt(tpathtselft_patht gccversiont _gccversiont_pathgccversion(RRR((td/home/faculty/youssef/public_html/pacman/sample_cache/tarballs/pre/tmp/pacman-3.29/src/GccVersion.pyt__init__ s  cCs |iƒS(N(Rtstr(R((R t__repr__scCsm|ip |io2d|id|id|id|i}n$d|id|id|i}|S(Nsfile s was made with gcc version s must be t (RtlastsattlastfailRRttypeRts(RR((R R s2#cCs#|i|ijo|i|ijS(N(RRtxR(RR((R tequalscCs-td|id|id||ij ƒS(NsBinary [s#] was not compiled with gccvesion [s].(tReasonRRRtcomp(RR((R t getReasonscCstd| d|i ƒS(Nt[s] has not yet been tested.(RRtacquired(R((R t satisfiedscCsãtƒ}t|iƒ|_tii|iƒo—yti |iƒ\}|_ Wn0t t fj otd|idƒ}nXtd|id|dj ƒ}|iƒo|i|ƒ}qßntd|idƒ}|S(NsError examining [s].sBinary [s] was not compiled with gcc.tglibcs] does not exist.(RtrtfullpathRRtosRtexistst platform23tlibc_verRRtOSErrortIOErrortokR(RRR((R tacquires ! cCstƒS(N(R(R((R tretract-s( t__name__t __module__RttitletactionR R R RRRR$R%(((R Rs       t GccBinaryLEcBs#tZdZdZdZd„ZRS(Nsgcc binary gcc version <=sGcc Binary Gcc Version <=s#test the gcc version of a binary <=cCs-td|id|id||ij ƒS(NsBinary [s&] was not compiled with gccvesion <= [s].(RRRRR(RR((R R4s(R&R'RR(R)R(((R R*/st GccBinaryLTcBs#tZdZdZdZd„ZRS(Nsgcc binary gcc version =sGcc Binary Gcc Version >=s#test the gcc version of a binary >=cCs-td|id|id||ij ƒS(NsBinary [s&] was not compiled with gccvesion >= [s].(RRRRR(RR((R RBs(R&R'RR(R)R(((R R,=st GccBinaryGTcBs#tZdZdZdZd„ZRS(Nsgcc binary gcc version >sGcc Binary Gcc Version >s"test the gcc version of a binary >cCs-td|id|id||ij ƒS(NsBinary [s%] was not compiled with gccvesion > [s].(RRRRR(RR((R RIs(R&R'RR(R)R(((R R-DscCsÆtdƒo±tidƒ\}}|djo‡ti|dƒ}d}d}x0|D](}|djo d}Pn|d}qTW|o'|dt |ƒjo||dSqºdSqÂdSnd SdS( Ntgccsgcc -viR tversionis- unknown gcc version -s- gcc unavailable -s- no gcc in $path -( t fileInPathtcommandstgetstatusoutputtstatustoutputtstringtsplittltgot_onetcounttlltlen(R3R9R8R:R7R4((R RKs"   t GccVersioncBs>tZdZdZdZd„Zd„Zd„Zd„ZRS(Ns gcc versions Gcc VersionscCsd|idtƒdS(Nsmust be equal to [s ], actually [s].(RtvalueR(R((R R cscCsŠtƒ}|djotdƒSnctƒ|ijod|_d|_tƒSn3d|_d|_tdtƒd|idƒSdS(Ns- no gcc in $path -s%[gcc] is not in the installer's path.iisgcc version is [s]. It must be [s].(RtpvRRR=RR(RR>((R Rds       cCs |iƒS(N(RR(R((R R$sscCstƒS(N(R(R((R R%ts( R&R'RR(R)R RR$R%(((R R<^s   t GccVersionLEcBs,tZdZdZdZd„Zd„ZRS(Nsgcc version <=sgcc version <=scCsd|idtƒdS(NRs ], actually [s].(RR=R(R((R R {scCsŠtƒ}|djotdƒSnctƒ|ijod|_d|_tƒSn3d|_d|_tdtƒd|idƒSdS(Ns- no gcc in $path -s%[gcc] is not in the installer's path.iisgcc version is [s]. It must be <= [s].(RR>RRR=RR(RR>((R R|s       (R&R'RR(R)R R(((R R?vs  t GccVersionLTcBs,tZdZdZdZd„Zd„ZRS(Ns gcc version RRR=RR(RR>((R Rs       (R&R'RR(R)R R(((R R@Šs  t GccVersionGEcBs,tZdZdZdZd„Zd„ZRS(Nsgcc version >=sgcc version >=scCsd|idtƒdS(NRs ], actually [s].(RR=R(R((R R £scCsŠtƒ}|djotdƒSnctƒ|ijod|_d|_tƒSn3d|_d|_tdtƒd|idƒSdS(Ns- no gcc in $path -s%[gcc] is not in the installer's path.iisgcc version is [s]. It must be >= [s].(RR>RRR=RR(RR>((R R¤s       (R&R'RR(R)R R(((R RAžs  t GccVersionGTcBs,tZdZdZdZd„Zd„ZRS(Ns gcc version >sgcc version >scCsd|idtƒdS(NRs ], actually [s].(RR=R(R((R R ·scCsŠtƒ}|djotdƒSnctƒ|ijod|_d|_tƒSn3d|_d|_tdtƒd|idƒSdS(Ns- no gcc in $path -s%[gcc] is not in the installer's path.iisgcc version is [s]. It must be > [s].(RR>RRR=RR(RR>((R R¸s       (R&R'RR(R)R R(((R RB²s  (t StringAttrR1Rt EnvironmentRR*R+R,R-RR<R?R@RARB( R1R-RAR<R*R@RR,RBR+R?RR((R t?s(