� ��abc @s_dZddlZddlZddlZddlZddlmZmZyddlZWne k r{ddl ZnXdddddd d d d d dg Z d�Z ej r�ejje ej ��Zne ej��Zejdkr(dedj�kr(e ejjee��Znejdkrndedj�krne ejjeee��Znejdkr�dedj�kr�e ejjeee��Znd�Ze�Zead�Zej�Zejd�Zd�Zejj �dZ!ejd Z"e!de!dZ#ejj$ej%�Z&ejj$ej'�Z(da*dZ+d�Z,d�Z-d �Z.d!�Z/d"�Z0d#�Z1dd$�Z2d%�Z3d&�Z4d'�Z5dd(�Z6d)�Z7d*�Z8d+�Z9e0�de:d,�Z;e0�de:d-�Z<d.�Z=d/�Z>d0�Z?d1�Z@d2�ZAd3�ZBeCd4kr[eB�ndS(5s-Access to Python's configuration information.i����N(tpardirtrealpathtget_config_h_filenametget_config_vartget_config_varstget_makefile_filenametget_pathtget_path_namest get_pathst get_platformtget_python_versiontget_scheme_namestparse_config_hcCs'yt|�SWntk r"|SXdS(N(RtOSError(tpath((sK/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyt_safe_realpath"s tnttpcbuildi����s\pc\vi����s\pcbuild\amd64i����cCs=x6dD].}tjjtjjtd|��rtSqWtS(Ns Setup.dists Setup.localtModules(s Setup.dists Setup.local(tosRtisfiletjoint _PROJECT_BASEtTruetFalse(tfn((sK/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/sysconfig.pytis_python_build:s $cCs�ts�ddlm}tjdd�d}||�}|jd�}|sYtd��|j��}tj |�WdQXt r�x7dD],}tj |d d �tj |d d �q�Wnt andS(Ni(tfindert.iis sysconfig.cfgssysconfig.cfg existst posix_prefixt posix_hometincludes{srcdir}/Includet platincludes{projectbase}/.(RR( t _cfg_readt resourcesRt__name__trsplittfindtAssertionErrort as_streamt_SCHEMEStreadfpt _PYTHON_BUILDtsetR(Rtbackport_packaget_findert_cfgfiletstscheme((sK/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyt_ensure_cfg_readDs  s \{([^{]*?)\}cs-t�|jd�r(|jd�}n t�}|j�}xb|D]Z}|dkr\qDnx?|D]7\}}|j||�r�qcn|j|||�qcWqDW|jd�xw|j�D]i}t|j|����fd�}x<|j|�D]+\}}|j||t j ||��q�Wq�WdS(Ntglobalscs0|jd�}|�kr#�|S|jd�S(Nii(tgroup(tmatchobjtname(t variables(sK/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyt _replaceros ( R1t has_sectiontitemsttupletsectionst has_optionR+tremove_sectiontdictt _VAR_REPLtsub(tconfigR2R;tsectiontoptiontvalueR7((R6sK/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyt_expand_globalsYs$     iiics�fd�}tj||�S(s�In the string `path`, replace tokens like {some.thing} with the corresponding value from the map `local_vars`. If there is no corresponding value, leave the token unchanged. csJ|jd�}|�kr#�|S|tjkr=tj|S|jd�S(Nii(R3Rtenviron(R4R5(t local_vars(sK/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyR7�s   (R?R@(RRGR7((RGsK/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyt _subst_vars�scCsI|j�}x6|j�D](\}}||kr7qn|||dttjf}nd}tjjt d�|d�S(s Return the path of the Makefile.tMakefiletabiflagss config-%s%sRAtstdlib( R*RRRRthasattrRbt_PY_VERSION_SHORTR�R(tconfig_dir_name((sK/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyRMs cCst�}yt||�WnLtk rh}d|}t|d�rY|d|j}nt|��nXt�}y&t|��}t||�WdQXWnLtk r�}d|}t|d�r�|d|j}nt|��nXtr�|d|dR(R9(R0RStexpand((sK/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyR�s cCst|||�|S(s[Return a path corresponding to the scheme. ``scheme`` is the install scheme name. (R(R5R0RSR�((sK/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyR�scGs�td"krRiattdkr�d4}qI|d?kr�d5}qIt d6|f��qL|d.krtj!d@krId0}qIqL|dAkrLtj!dBkr@d3}qId/}qLqOnd:|||fS(Cs�Return 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'. Rs bit (i����t)tamd64s win-amd64titaniumswin-ia64ROR�t/RmR�t_t-itlinuxs%s-%stsunosit5tsolariss%d.%siiitirixtaixs%s-%s.%sitcygwins[\d.]+R^tMACOSX_DEPLOYMENT_TARGETs0/System/Library/CoreServices/SystemVersion.plists=ProductUserVisibleVersion\s*(.*?)NRitmacosxs10.4.s-archRotfats -arch\s+(\S+)ti386tppctx86_64tinteltfat3tppc64tfat64t universals%Don't know machine value for archs=%ri tPowerPCtPower_Macintoshs%s-%s-%s(R�R�(R�R�(R�R�R�(R�R�(R�R�R�R�I(R�R�I("RR5RbR�R%RcRtlowerR�R�R{R|RsRtRzR3RRaRRvR�R�treadtcloseRPRR�RytfindallR:R�R+R}tmaxsize(R�titjtlooktosnamethosttreleaseR�tmachinetrel_reR�tcfgvarstmacvert macreleaseR�tcflagstarchs((sK/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyR [s�    (     + !               cCstS(N(R�(((sK/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyR �scCsZxStt|j���D]9\}\}}|dkrCd|GHnd||fGHqWdS(Nis%s: s %s = "%s"(t enumerateR�R9(ttitletdatatindexRMRD((sK/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyt _print_dicts+  cCsRdt�GHdt�GHdt�GHdGHtdt��dGHtdt��dS( s*Display all information sysconfig detains.sPlatform: "%s"sPython version: "%s"s!Current installation scheme: "%s"tPathst VariablesN(((R R RWRRR(((sK/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyt_mains   t__main__(Dt__doc__RuRRsRbtos.pathRRt configparsert ImportErrort ConfigParsert__all__RR�RR�RR�R5R�RRR*RR!R1tRawConfigParserR(RtR?RER�R�R�R�R�RRR�R�R�R�RPR�t _USER_BASERHRNRURVRWRhR�RR�R�R RR RRRRRRR R RRR#(((sK/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyts�        %%!%!     #      v       � �