zfc@sdZdZdZddlZddlZddlZddlZy ejZWn/e k rej dkrwd Zqd ZnXi d d 6d d6d d6dd6dd6dd6dd6dd6dd6dd6Z ej dZ dZej dZejdddd Zd!Zej d"Zej d#Zej d$ZdZd3Zddded4d5Zddded6Zd7dd8YZd9dd:Zdd;Zej d<Zddddd=Zi d>d6dAd6dBd6dDd6dEd6dGd6dHd6dId6dKd6dLd6dMd6Z idBd6dNd6dOd6dPd6dQd6dRd6Z!dSZ"dddddTZ#ddUZ$dVZ%dWZ&dXZ'ddddYZ(dZZ)ddddd[Z*d\Z+d]Z,dd^Z-e.ej/d_s%ej/j0ej/j1ej2ej/j3d`Z4n ej/j5Z4daZ6ddbZ7ddcZ8idd6dd6dd6Z9ej dgj:Z;ejdddhZ<da=diZ>djZ?dkZ@dlZAdmZBdnZCdoZDej dpZEej dqZFej drZGej dsZHiZIddtZJduZKdvZLdwZMdxZNdyZOdzZPd{ZQiZRd@d@d|Z eSd}krd~ejTkpdejTkZUdejTkodejTkZVe eVeUGHejWd@ndS(s8 This module tries to retrieve as much platform-identifying data as possible. It makes this information available via function APIs. If called from the command line, it prints the platform information concatenated as single string to stdout. The output format is useable as part of a filename. s Copyright (c) 1999-2000, Marc-Andre Lemburg; mailto:mal@lemburg.com Copyright (c) 2000-2010, eGenix.com Software GmbH; mailto:info@egenix.com Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee or royalty is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation or portions thereof, including modifications, that you make. EGENIX.COM SOFTWARE GMBH DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE ! s1.0.7iNtdostwin32twin16tos2tNULs /dev/nulli tdevitalphataitbetatbi(tci2tRCtrcitpltps([0-9]+|[._+-])cCsg}xxtj|D]g}|dkryt|d}d}Wn#tk rftj|d}nX|j||fqqW|S(Ns._+-i idi(t _component_retsplittintt ValueErrort _ver_stagestgettextend(tversiontresulttvtt((s /usr/lib64/python2.7/platform.pyt_comparable_versions   sC(__libc_init)|(GLIBC_([0-9.]+))|(libc(_\w+)?\.so(?:\.(\d[0-9.]*))?)tic Cst}ttjdr-tjj|}nt|d}|j|}d}x|t|krd|ksd|krtj ||}nd}| s|j t|kr |j|} | r|t |t|d| }d}qWn|s Pq n|j \} } } } }}| r>| r>d}n| r|dkr_d}| }q|| ||kr| }qnv| r|dkrd}|r| s||||kr|}n|r|t| |kr||}qqn|j }qWWWdQX||fS( s Tries to determine the libc version that the file executable (which defaults to the Python interpreter) is linked against. Returns a tuple of strings (lib,version) which default to the given parameters in case the lookup fails. Note that the function has intimate knowledge of how different libc versions add symbols to the executable and thus is probably only useable for executables compiled using gcc. The file is read and scanned in chunks of chunksize bytes. trealpathtrbitlibctGLIBCitglibcN(RthasattrtostpathRtopentreadtlent _libc_searchtsearchtNonetendtmaxtgroups(t executabletlibRt chunksizetVtftbinarytpostmtchunktlibcinitR t glibcversiontsotthreadst soversion((s /usr/lib64/python2.7/platform.pytlibc_versH!      % c Cstjjdrtdj}d}x|D]}tj|}t|dkr1|\}}nq1|dkrtj|}q1|dkr1tj|d}|d}q1q1W|||fStjjdrAtdj}xV|D]K}tj|d} t| dkr| dd krd | d |fSqWntjj d rtj d } xBt t| d d d D]$} | | d dkr| | =qqW| r| j d}| d d }|||fSn|||fS(s Tries some special tricks to get the distribution information in case the default method fails. Currently supports older SuSE Linux, Caldera OpenLinux and Slackware Linux distributions. s/var/adm/inst-log/infotSuSEitMIN_DIST_VERSIONt DIST_IDENTt-s/etc/.installedit OpenLinuxis/usr/lib/setupiisslack-version-t slackware( R"R#texistsR$t readlineststringRR&tstriptisdirtlistdirtrangetsort( tdistnameRtidtinfotlinettvttagtvaluetvaluestpkgtverfilestn((s /usr/lib64/python2.7/platform.pyt_dist_try_harders>      "# s(\w+)[-_](release|version)s'(.+) release ([\d.]+)[^(]*(?:\((.+)\))?s1([^0-9]+)(?: release )?([\d.]+)[^(]*(?:\((.+)\))?R<tdebiantfedoratredhattcentost almalinuxtmandraketmandrivatrocksRAt yellowdogtgentoot UnitedLinuxt turbolinuxcCsd}d}tj|}|dk r7t|jStj|}|dk rbt|jStjtj|}|r|d}t |dkr|d}qnd||fS(NRii( t_lsb_release_versiontmatchR)ttupleR,t_release_versionRDRRER&(t firstlineRRKR4tl((s /usr/lib64/python2.7/platform.pyt_parse_release_file*s   icCs#ytjd}Wntjk r3|||fSX|jxd|D]L}tj|}|dk rE|j\}} ||kr|}PqqEqEWt|||St d|d} | j } | j t | \}} } |r|r|}n| r| }n| r| }n|||fS(s Tries to determine the name of the Linux OS distribution name. The function first looks for a distribution release file in /etc and then reverts to _dist_try_harder() in case no suitable files are found. supported_dists may be given to define the set of Linux distributions to look for. It defaults to a list of currently supported Linux distributions identified by their release file name. If full_distribution_name is true (default), the full distribution read from the OS is returned. Otherwise the short name taken from supported_dists is used. Returns a tuple (distname,version,id) which default to the args given as parameters. s/etcs/etc/trN( R"RGterrorRIt_release_filenameRcR)R,RUR$treadlinetcloseRh(RJRRKtsupported_diststfull_distribution_nametetctfileR4t _distnametdummyR1Rft_versiont_id((s /usr/lib64/python2.7/platform.pytlinux_distributionEs0           cCst|||d|ddS(sQ Tries to determine the name of the Linux OS distribution name. The function first looks for a distribution release file in /etc and then reverts to _dist_try_harder() in case no suitable files are found. Returns a tuple (distname,version,id) which default to the args given as parameters. RnRoi(Rv(RJRRKRn((s /usr/lib64/python2.7/platform.pytdist}st_popencBsbeZdZdZdZdZdZdddZdZ dZ e j e j dZeZRS(s Fairly portable (alternative) popen implementation. This is mostly needed in case os.popen() is not available, or doesn't work as advertised, e.g. in Win9X GUI programs like PythonWin or IDLE. Writing to the pipe is currently not supported. RRicCst|dkrtdnddl}|j|_}tj|d|t|d|_||_||_ dS(NRis)popen()-emulation only supports read modeis > %sR( RttempfiletmktempttmpfileR"tsystemR$tpipetbufsizetmode(tselftcmdRR~RyR{((s /usr/lib64/python2.7/platform.pyt__init__s    cCs |jjS(N(R}R%(R((s /usr/lib64/python2.7/platform.pyR%scCs |jdk r|jjSdS(N(R~R)R}RC(R((s /usr/lib64/python2.7/platform.pyRCscCsV|jr|jj}nd}|jrRy||jWqR|k rNqRXn|S(Ni(R}RmR{(RtremoveRjR ((s /usr/lib64/python2.7/platform.pyRms   N(t__name__t __module__t__doc__R{R)R}R~RRR%RCR"tunlinkRjRmt__del__(((s /usr/lib64/python2.7/platform.pyRxs   RicCsd}tjjdddkrQyddl}Wntk rDqQX|j}n|dkrttdrtj}tj dkry|dWqtj k rt }qXqqt }n|dkr|||S||||SdS(s! Portable popen() interface. tOSRt Windows_NTiNtpopenR( R)R"tenvironRt win32pipet ImportErrorRR!tsystplatformRjRx(RRR~RR((s /usr/lib64/python2.7/platform.pyRs&       cCs~tj|d}|r(|j|nytt|}Wntk rT|}nXtt|}tj|d d}|S(s Normalize the version and build strings and return a single version string using the format major.minor.build (or patchlevel). t.i(RDRtappendtmapRRtstrtjoin(RtbuildRgtintststrings((s /usr/lib64/python2.7/platform.pyt _norm_versions  s'(?:([\w ]+) ([\w.]+) .*\[.* ([\d.]+)\])c Cs8tj|kr|||fSxdD]o}y7t|}|j}|jr_tjdnWn.tjk r{}q#q#tk r}q#q#XPq#W|||fStj |}t j |}|dk r+|j \}}}|ddkr|d }n|ddkr|d }nt|}n|||fS( s2 Tries to figure out the OS version used and returns a tuple (system,release,version). It uses the "ver" shell command for this which is known to exists on Windows, DOS and OS/2. XXX Others too ? In case this fails, the given parameters are used as defaults. tverscommand /c vers cmd /c verscommand failediR(Rscommand /c vers cmd /c verN(RRRR%RmR"RjtIOErrorRDREt _ver_outputRcR)R,R( R|treleaseRtsupported_platformsRR}RLtwhyR4((s /usr/lib64/python2.7/platform.pyt _syscmd_vers0         t2000iitXPt 2003Serveritpost2003tVistait7t8s8.1ispost8.1t10tpost10t 2008Servert 2008ServerR2t 2012Servert 2012ServerR2tpost2012ServerR2cs |dks$|dkr1|dkr1|||fSddlm}m}m}m}m}m}m} ddlm m } d|ffdYd| ffd Y} |d } |d } d }}x]||kr4|d9}||}| j | | j |t |}|s|||fSqW| j|d}|sZ|||fS||}| j|d|| s| r|||fS| }| j|d |||s|||fS|jjd?}|jjd@}|jjd?}|||fS(Niii(tc_buffertPOINTERtbyreftcreate_unicode_buffert StructuretWinDLLt_Pointer(tDWORDtHANDLEtVS_FIXEDFILEINFOcseZdfdfdfdfdfdfdfdfdfd fd fd fd fg ZRS( t dwSignaturetdwStrucVersiontdwFileVersionMStdwFileVersionLStdwProductVersionMStdwProductVersionLStdwFileFlagsMaskt dwFileFlagstdwFileOSt dwFileTypet dwFileSubtypet dwFileDateMSt dwFileDateLS(RRt_fields_((R(s /usr/lib64/python2.7/platform.pyR^s            tPVS_FIXEDFILEINFOcseZZRS((RRt_type_((R(s /usr/lib64/python2.7/platform.pyRnstkernel32RiRii(tctypesRRRRRRRtctypes.wintypesRRtGetModuleFileNameWt_handleR&tGetFileVersionInfoSizeWR)tGetFileVersionInfoWtVerQueryValueWtcontentsRR(tmajtminRRRRRRRRRRRRtname_lent actual_lentnametsizet ver_blocktpvi((RRs /usr/lib64/python2.7/platform.pyt_get_real_winverVs<$ 4         ' cCsyddlm}Wntk r4||||fSXy&ddlm}m}m}m}Wn3tk rddlm}m}m}m}nX|} t | d \} } } dj | | | }t j | | fpt j | dfp|}| d | | fkr\ydj | j}Wq\tk rX|d d krYd |d}qYq\Xnt| d ddkrtj | | fptj | dfp|}nd} z4y&||d } || d d}WnnXWd| r|| nX||||fS(Ni(tgetwindowsversion(t OpenKeyExt QueryValueExtCloseKeytHKEY_LOCAL_MACHINEis {0}.{1}.{2}isSP{}i s Service Pack tSPt product_types,SOFTWARE\Microsoft\Windows NT\CurrentVersiont CurrentTypei(RRRtwinregRRRRt_winregRtformatt_WIN32_CLIENT_RELEASESRR)tservice_pack_majortAttributeErrortgetattrt_WIN32_SERVER_RELEASES(RRtcsdtptypeRRRRRtwinverRRRtkey((s /usr/lib64/python2.7/platform.pyt win32_versF & &    cCs{ddlm}ddl}g}|j}xI|D]A}y|||Wq2t|jfk rr||q2Xq2W|S(Ni(tgestalt(RtMacOSRt RuntimeErrortError(t selectorstdefaultRRRgRtselector((s /usr/lib64/python2.7/platform.pyt_mac_ver_lookups   cCst|dS(Ni(thex(tbcd((s /usr/lib64/python2.7/platform.pyt_bcd2strsc Cs yddl}ddl}Wntk r0dSXtd\}}|r|d@d?}|d@d?}|d @}||fdkrtd\}}}d|||f}qdt|||f}n|ridd6dd6dd 6j|d}nd} || |fS(s Thanks to Mark R. Levinson for mailing documentation links and code examples for this function. Documentation for the gestalt() API is available online at: http://www.rgaros.nl/gestalt/ iNtsysvtsysaiiiiii tsys1tsys2tsys3s%i.%i.%is%s.%i.%it68kitPowerPCiti386R(RR(i i(RRR(RRR(RRRR)RRR( RRRRtmajortminortpatchRtmachinet versioninfo((s /usr/lib64/python2.7/platform.pyt_mac_ver_gestalts(     cCsd}tjj|sdSyddl}Wntk r@dSX|j|}|d}d }tjd}|d krd}n|||fS( Ns0/System/Library/CoreServices/SystemVersion.plistitProductVersionRitppcsPower MacintoshR(RRR(R sPower Macintosh(R"R#RBR)tplistlibRt readPlisttuname(tfnR R RRR((s /usr/lib64/python2.7/platform.pyt _mac_ver_xmls    cCs?t}|dk r|St}|dk r2|S|||fS(s< Get MacOS version information and return it as tuple (release, versioninfo, machine) with versioninfo being a tuple (version, dev_stage, non_release_version). Entries which cannot be determined are set to the parameter values which default to ''. All tuple entries are strings. N(RR)R(RRRRL((s /usr/lib64/python2.7/platform.pytmac_vers    cCsPddlm}y'|j|}|dkr2|S|SWntk rK|SXdS(Ni(tSystem(t java.langRt getPropertyR)R(RRRRP((s /usr/lib64/python2.7/platform.pyt _java_getprop*s  c Csyddl}Wntk r0||||fSXtd|}td|}|\}}}td|}td|}td|}|||f}|\}} } td| } td |}td | } || | f}||||fS( sV Version interface for Jython. Returns a tuple (release,vendor,vminfo,osinfo) with vminfo being a tuple (vm_name,vm_release,vm_vendor) and osinfo being a tuple (os_name,os_version,os_arch). Values which cannot be determined are set to the defaults given as parameters (which all default to ''). iNs java.vendors java.versions java.vm.namesjava.vm.vendorsjava.vm.versions java.os.archs java.os.namesjava.os.version(RRR( Rtvendortvminfotosinfotjavatvm_namet vm_releaset vm_vendortos_namet os_versiontos_arch((s /usr/lib64/python2.7/platform.pytjava_ver5s"  cCs|dkrd|||fS|dkr|dkrB|||fStj|d}|ryt|d}Wntk rqX|d}t||dRtdirnametreadlink(tfilepath((s /usr/lib64/python2.7/platform.pyt_follow_symlinkss   1cCstjdkr|Sytjd|tf}Wnttjfk rM|SXtj|j }|j }| s||r|S|SdS(s. Interface to the system's uname command. RRRRsuname %s 2> %sN(RRRR( RRR"RtDEV_NULLRRjRDRER%Rm(toptionRR1toutputR ((s /usr/lib64/python2.7/platform.pyt _syscmd_unames  cCsddl}tjd kr|St|}y+|jd|gd|jd |j}Wnttj fk rs|SX|j d }|j }| s|r|S|SdS( s& Interface to the system's file command. The function uses the -b option of the file command to have it ommit the filename in its output and if possible the -L option to have the command follow symlinks. It returns default in case the command should fail. iNRRRRRqtstdouttstderri(RRRR( t subprocessRRRDtPopentPIPEtSTDOUTRR"Rjt communicatetwait(ttargetRRKtprocRGR ((s /usr/lib64/python2.7/platform.pyt _syscmd_files    t WindowsPER(tMSDOSs[\s,]c Cs|sbddl}y|jd}Wn#|jk rJ|jd}nXt|dd}n|rzt|d}nd}| r|tjkrtjtkrttj\}}|r|}n|r|}qn||fSt |d}d |kr ||fSd |krd }n*d |kr3d }nd|krHd}nd|kr]d}nTd|krd|kr~d}qd}n*d|krd}nd|krd}n||fS(s Queries the given executable (defaults to the Python interpreter binary) for various architecture information. Returns a tuple (bits,linkage) which contains information about the bit architecture and the linkage format used for the executable. Both values are returned as strings. Values that cannot be determined are returned as given by the parameter presets. If bits is given as '', the sizeof(pointer) (or sizeof(long) on Python version < 1.5.2) is used as indicator for the supported pointer size. The function relies on the system's "file" command to do the actual work. This is available on most if not all Unix platforms. On some non-Unix platforms where the "file" command does not exist and the executable is set to the Python interpreter binary defaults from _default_architecture are used. iNtPRgitbitRiR-s32-bitt32bittN32tn32bits64-bitR'tELFtPER(RTtCOFFsMS-DOSRU( tstructtcalcsizeRjRRSRR-Rt_default_architecturet_architecture_split( R-tbitstlinkageR^RRGR Rgtfileout((s /usr/lib64/python2.7/platform.pyt architecture)sN                      cCsd}tdk rtSd}ytj\}}}}}Wntk rTd}nX|sztd|||||f rG|rtj}d}d}t}d}nd}|dkrIt \}}}} |r|rd}n|s(dtj krtj j dd}q(tj j dd}n|sItj j d|}qIn|rt |\}}}|dkryd }q|d kr|d krd }d |d krd }qd}qn|dkr|s|dkrd}qd}nd }qG|d dkrGt \}} } } d}tj| d}|sD| }qDqGn|dkr| sf|dkru|}d}nyddl} Wntk rqX| jdd\}}|dkrd}qd}n|stdd}n|dkrd}n|dkrd}n|dkr&d}n|dkr;d}n|dkrPd}n|dkred}n|d kr|d krd }d }n||||||fatS( si Fairly portable uname interface. Returns a tuple of strings (system,node,release,version,machine,processor) identifying the underlying platform. Note that unlike the os.uname function this also returns possible processor information as an additional tuple entry. Entries which cannot be determined are set to ''. iRiRtPROCESSOR_ARCHITEW6432tPROCESSOR_ARCHITECTUREtPROCESSOR_IDENTIFIERsMicrosoft WindowsR(t Microsofts6.0iRRRXt16bitiRtJavas, tOpenVMSt0iNsSYI$_CPUitAlphatVAXs-pR2(RR(t _uname_cacheR)R"R RR3RRR:RRRRRRDRtvms_libRtgetsyiRH(t no_os_unamet processorR|tnodeRRRtuse_syscmd_verRRRRRRqtcsidt cpu_number((s /usr/lib64/python2.7/platform.pyR s    %                                  cCs tdS(s Returns the system/OS name, e.g. 'Linux', 'Windows' or 'Java'. An empty string is returned if the value cannot be determined. i(R (((s /usr/lib64/python2.7/platform.pyR| scCs tdS(s Returns the computer's network name (which may not be fully qualified) An empty string is returned if the value cannot be determined. i(R (((s /usr/lib64/python2.7/platform.pyRuscCs tdS(s Returns the system's release, e.g. '2.2.0' or 'NT' An empty string is returned if the value cannot be determined. i(R (((s /usr/lib64/python2.7/platform.pyRscCs tdS(s Returns the system's release version, e.g. '#3 on degas' An empty string is returned if the value cannot be determined. i(R (((s /usr/lib64/python2.7/platform.pyR'scCs tdS(st Returns the machine type, e.g. 'i386' An empty string is returned if the value cannot be determined. i(R (((s /usr/lib64/python2.7/platform.pyR0scCs tdS(s Returns the (true) processor name, e.g. 'amdk6' An empty string is returned if the value cannot be determined. Note that many platforms do not provide this information or simply return the same value as for machine(), e.g. NetBSD does this. i(R (((s /usr/lib64/python2.7/platform.pyRt9s sL([\w.+]+)\s*\(#?([^,]+)(?:,\s*([\w ]*)(?:,\s*([\w :]*))?)?\)\s*\[([^\]]+)\]?s;IronPython\s*([\d\.]+)(?: \(([\d\.]+)\))? on (.NET [\d\.]+)sU([\d.]+)\s*\(IronPython\s*[\d.]+\s*\(([\d.]+)\) on ([\w.]+ [\d.]+(?: \(\d+-bit\))?)\)sE([\w.+]+)\s*\(#?([^,]+),\s*([\w ]+),\s*([\w :]+)\)\s*\[PyPy [^\]]+\]?cCs|dkrtj}ntj|d}|dk r:|Sd|krd}|jdrmtj|}ntj|}|dkrt dt |n|j \}}}d}d}nptj jdrMd}t j|}|dkrt dt |n|j \}}}} } |dkrAd}ntj }nd|krd}tj|}|dkrt dt |n|j \}}}} d}nt j|}|dkrt d t |n|j \}}}} }d }|dkrd}n| r5|d | }nttd rYtj\} } } n d} d} tj|d } t| dkr| jdtj| d }n||| | |||f}|t|<|S(s Returns a parsed version of Python's sys.version as tuple (name, version, branch, revision, buildno, builddate, compiler) referring to the Python implementation name, version, branch, revision, build number, build date/time as string and the compiler identification string. Note that unlike the Python sys.version, the returned value for the Python version will always include the patchlevel (it defaults to '.0'). The function returns empty strings for tuple entries that cannot be determined. sys_version may be given to parse an alternative version string, e.g. if the version was read from a different Python interpreter. t IronPythons*failed to parse IronPython sys.version: %sRRtJythons&failed to parse Jython sys.version: %stPyPys$failed to parse PyPy sys.version: %ss'failed to parse CPython sys.version: %stCPythonR*t subversionRiRmN(R)RRt_sys_version_cacheRt startswitht_ironpython_sys_version_parserRct _ironpython26_sys_version_parserRtreprR,Rt_sys_version_parsert_pypy_sys_version_parserR!R}RDRR&RR(t sys_versionRRRcRt alt_versiontcompilertbuildnot builddatet buildtimeR+tbranchtrevisionRg((s /usr/lib64/python2.7/platform.pyt _sys_versioncst                  cCs tdS(sR Returns a string identifying the Python implementation. Currently, the following implementations are identified: 'CPython' (C implementation of Python), 'IronPython' (.NET implementation of Python), 'Jython' (Java implementation of Python), 'PyPy' (Python implementation of Python). i(R(((s /usr/lib64/python2.7/platform.pytpython_implementations cCs tdS(s Returns the Python version as string 'major.minor.patchlevel' Note that unlike the Python sys.version, the returned value will always include the patchlevel (it defaults to 0). i(R(((s /usr/lib64/python2.7/platform.pytpython_versionscCsttjtddS(s Returns the Python version as tuple (major, minor, patchlevel) of strings. Note that unlike the Python sys.version, the returned value will always include the patchlevel (it defaults to 0). iR(RdRDRR(((s /usr/lib64/python2.7/platform.pytpython_version_tuples cCs tdS(s Returns a string identifying the Python implementation branch. For CPython this is the Subversion branch from which the Python binary was built. If not available, an empty string is returned. i(R(((s /usr/lib64/python2.7/platform.pyt python_branchs cCs tdS(s Returns a string identifying the Python implementation revision. For CPython this is the Subversion revision from which the Python binary was built. If not available, an empty string is returned. i(R(((s /usr/lib64/python2.7/platform.pytpython_revisions cCstdd!S(sh Returns a tuple (buildno, builddate) stating the Python build number and date as strings. ii(R(((s /usr/lib64/python2.7/platform.pyt python_buildscCs tdS(sS Returns a string identifying the compiler used for compiling Python. i(R(((s /usr/lib64/python2.7/platform.pytpython_compilersc Cs[tj||fd}|dk r(|St\}}}}}}||krXd}n|r|t|||\}}}n|dkrt|\} } } } |rt||} qGt|||| } nw|d krYtd\}}}|r"| r"t||||d|||} qGtt j \}}t||||d||} n|dkrt \}}}\}}}|s| rt|||} qGt|||d|||} n|dkr|rt||} qGt|||} nH|rt||} n0t t j \}}t||||||} | t||f<| S( s Returns a single string identifying the underlying platform with as much useful information as possible (but no more :). The output is intended to be human readable rather than machine parseable. It may look different on different platforms and this is intended. If "aliased" is true, the function will use aliases for various platforms that report system names which differ from their common names, e.g. SunOS will be reported as Solaris. The system_alias() function is used to implement this. Setting terse to true causes the function to return only the absolute minimum information needed to identify the platform. RR(tLinuxtwithRktonRN(R( t_platform_cacheRR)R R)RR7RwR;RR-RRe(taliasedtterseRR|RuRRRRttreltversRRRRJt distversiontdistidtlibcnamet libcversionRiRRRRRRbRc((s /usr/lib64/python2.7/platform.pyRsP          t__main__Rs--terset nonaliaseds --nonaliased(RRRR(R<RVRWRXRYRZR[R\R]RAR^R_R`Ra((RRRR(ii(ii(ii(iN(ii(ii(ii(ii(iN(i i(i N(ii(ii(ii(ii(ii(iN(RRR(RRR(RRR(RRT(RR((RRU(XRt __copyright__t __version__RRDR"tretdevnullRERRRtcompileRRR'R-R;RURkRbRet_supported_distsRhRvRwRxR)RRRRRRRRRRRRRRRR)R7R:R!R#R<RR=R>R?R;RDRHRSR`RRaReRpR R|RuRRRRtRRRRR~RRRRRRRRRRtargvRRtexit(((s /usr/lib64/python2.7/platform.pyt sh0     8 2    5  6"   2   =/  )  # 6 $    3 W      g   R