_Rc@s dZddlZddlZddlmZmZiidd6dd6dd 6d d 6d d 6dd6dd6dd6d6idd6dd6dd 6dd 6dd 6dd6dd6dd6d6idd6dd6dd 6dd 6dd 6dd6dd6dd6d6idd6dd6dd 6dd 6dd 6dd6dd6dd6d6idd6dd6dd 6dd 6d d 6d!d6d"d6d#6id$d6d$d6d%d 6d%d 6d&d 6d'd6d"d6d(6idd6dd6dd 6dd 6d d 6d!d6d"d6d)6id*d6d*d6d+d 6d+d 6d,d 6d!d6d"d6d-6ZdTZejj d.Z ejd/ Z e d.e d0Z ej jejZej jejZdadZd1Zejrej jeejZneejZejdkr d2ed3jkr eej jeeZnejdkrOd4ed5jkrOeej jeeeZnejdkrd6ed7jkreej jeeeZnd8ejkrej jej jd9Znd:Z e Z!e!r x-dUD]"Z"d;ee"d Z$d?Z%d@Z&dAZ'ddBZ(dCZ)dDZ*dEZ+dFZ,ddGZ-dHZ.dIZ/dJZ0e&de1dKZ2e&de1dLZ3dMZ4dNZ5dOZ6dPZ7dQZ8dRZ9e:dSkre9ndS(Vs7Provide access to Python's configuration information. iN(tpardirtrealpaths#{base}/lib/python{py_version_short}tstdlibs'{platbase}/lib/python{py_version_short}t platstdlibs1{base}/lib/python{py_version_short}/site-packagestpurelibs5{platbase}/lib/python{py_version_short}/site-packagestplatlibs'{base}/include/python{py_version_short}tincludes+{platbase}/include/python{py_version_short}t platincludes {base}/bintscriptss{base}tdatat posix_prefixs{base}/lib/pythons{base}/include/pythont posix_homes {base}/Libs{base}/Lib/site-packagess{base}/Includes{base}/Scriptstnttos2s'{userbase}/lib/python{py_version_short}s5{userbase}/lib/python{py_version_short}/site-packagess+{userbase}/include/python{py_version_short}s{userbase}/bins {userbase}tos2_homes#{userbase}/Python{py_version_nodot}s1{userbase}/Python{py_version_nodot}/site-packagess+{userbase}/Python{py_version_nodot}/Includes{userbase}/Scriptstnt_usert posix_users{userbase}/lib/pythons#{userbase}/lib/python/site-packagess{userbase}/includetosx_framework_useriiicCs'yt|SWntk r"|SXdS(N(RtOSError(tpath((s/usr/lib/python2.7/sysconfig.pyt_safe_realpathas tpcbuildis\pc\vis\pcbuild\amd64it_PYTHON_PROJECT_BASEt.cCs=x6dD].}tjjtjjtd|rtSqWtS(Ns Setup.dists Setup.localtModules(s Setup.dists Setup.local(tosRtisfiletjoint _PROJECT_BASEtTruetFalse(tfn((s/usr/lib/python2.7/sysconfig.pytis_python_build{s $s{projectbase}/Includes{srcdir}cCscy|j|SWnKtk r^y|jtjSWq_tk rZ}td|q_XnXdS(Ns{%s}(tformattKeyErrorRtenvirontAttributeError(tst local_varstvar((s/usr/lib/python2.7/sysconfig.pyt _subst_varss cCsI|j}x6|jD](\}}||kr7qn|||RRRLtcwdRRtvalsR5((s/usr/lib/python2.7/sysconfig.pyR3sJ                   cCstj|S(sReturn the value of a single variable using the dictionary returned by 'get_config_vars()'. Equivalent to get_config_vars().get(name) (R3RF(R5((s/usr/lib/python2.7/sysconfig.pyRIscCsddl}tjdkrd}tjj|}|dkrFtjStjjd|}tj|t||!j}|dkrdS|dkrd StjSd tj krtj d Stjd kst td  rtjStj \}}}}} |jj d d}| j dd} | j d d} |d dkrWd|| fS|d dkr|ddkrd}dt |dd|df}idd6dd6} | d | tj7} qn|d! d"krd||fS|d d#kr d$|||fS|d% d&krYd&}|jd'} | j|} | r| j}qnC|d% d(krddl} | jt||| \}}} nd)||| fS(*sReturn a string that identifies the current platform. This is used mainly to distinguish platform-specific build directories and platform-specific built distributions. Typically includes the OS name and version and the architecture (as supplied by 'os.uname()'), although the exact information included depends on the OS; eg. for IRIX the architecture isn't particularly important (IRIX only runs on SGI hardware), but for Linux the kernel version isn't particularly important. Examples of returned values: linux-i586 linux-alpha (?) solaris-2.6-sun4u irix-5.3 irix64-6.2 Windows will return one of: win-amd64 (64bit Windows on AMD64 (aka x86_64, Intel64, EM64T, etc) win-ia64 (64bit Windows on Itanium) win32 (all others - specifically, sys.platform is returned) For other non-POSIX platforms, currently just returns 'sys.platform'. iNR s bit (t)tamd64s win-amd64titaniumswin-ia64t_PYTHON_HOST_PLATFORMR1tunamet/RPt t_t-itlinuxs%s-%stsunosit5tsolariss%d.%siit32bitit64bitls.%sitirixtaixs%s-%s.%sitcygwins[\d.]+RCs%s-%s-%s(RRRR5RGRtfindRHtlentlowerR#RRRZR[tmaxintRSRXRYRtget_platform_osxR3(RRRtitjtlooktosnamethosttreleaseRtmachinetbitnesstrel_reRlR((s/usr/lib/python2.7/sysconfig.pyRsZ      " cCstS(N(R(((s/usr/lib/python2.7/sysconfig.pytget_python_versionbscCsZxStt|jD]9\}\}}|dkrCd|GHnd||fGHqWdS(Nis%s: s %s = "%s"(t enumeratetsortedR*(ttitleR tindexR.R/((s/usr/lib/python2.7/sysconfig.pyt _print_dictfs+  cCsddtjkrtdSdtGHdtGHdtGHHtdtHtdtdS(s*Display all information sysconfig detains.s--generate-posix-varsNsPlatform: "%s"sPython version: "%s"s!Current installation scheme: "%s"tPathst Variables( RGtargvRRRR<RRR3(((s/usr/lib/python2.7/sysconfig.pyt_mainms   t__main__(sstdlibs platstdlibspurelibsplatlibsincludesscriptssdata(s posix_prefixs posix_home(;t__doc__RGRtos.pathRRR4RRtsplitRRRRR7RRRRR2Rt _USER_BASERRRRRR5RRR#tabspathR RwR8R(R0R;R<RNRtRyRRRRRRRRRRxR3RIRRRRt__name__(((s/usr/lib/python2.7/sysconfig.pyts            %%!%!!       V  D       G  \