ó
‰wÛjc           @   sÈ  d  Z  d d l Z d d l Z d d l m Z m Z i i d d 6d d 6d d	 6d
 d 6d d 6d d 6d d 6d d 6d 6i d d 6d d 6d d	 6d d 6d d 6d d 6d d 6d d 6d 6i d d 6d d 6d d	 6d d 6d d 6d d 6d d 6d d 6d 6i d d 6d d 6d d	 6d d 6d d 6d d 6d d 6d d 6d 6i d d 6d d 6d d	 6d d 6d  d 6d! d 6d" d 6d# 6i d$ d 6d$ d 6d% d	 6d% d 6d& d 6d' d 6d" d 6d( 6i d d 6d d 6d d	 6d d 6d  d 6d! d 6d" d 6d) 6i d* d 6d* d 6d+ d	 6d+ d 6d, d 6d! d 6d" d 6d- 6Z dW Z e j j	 ƒ  d. Z
 e j d/  Z e
 d. e
 d0 Z e j j e j ƒ Z e j j e j ƒ Z d a d Z e j j d1 d ƒ Z d2 „  Z e r±e Z n9 e j rØe j j e e j ƒ ƒ Z n e e j ƒ  ƒ Z e j d k r-d3 e d4 j ƒ  k r-e e j j  e e ƒ ƒ Z n  e j d k rsd5 e d6 j ƒ  k rse e j j  e e e ƒ ƒ Z n  e j d k re j j! e j j e j j e ƒ ƒ ƒ j ƒ  d7 k re j j! e j j e ƒ ƒ j ƒ  d8 k re e j j  e e e e ƒ ƒ Z n  e j d k rLd9 e d: j ƒ  k rLe e j j  e e e ƒ ƒ Z n  d; e j k r|e j j e j j" d< ƒ ƒ Z n  d= „  Z# e# ƒ  Z$ e$ rÄx- dX D]" Z% d> e e% d <d? e e% d <q›Wn  d@ „  Z& dA „  Z' dB „  Z( dC „  Z) dD „  Z* d dE „ Z+ dF „  Z, e, Z- dG „  Z. dH „  Z/ dI „  Z0 d dJ „ Z1 dK „  Z2 dL „  Z3 dM „  Z4 e) ƒ  d e5 dN „ Z6 e) ƒ  d e5 dO „ Z7 dP „  Z8 dQ „  Z9 dR „  Z: dS „  Z; dT „  Z< dU „  Z= e> dV k rÄe= ƒ  n  d S(Y   s7   Provide access to Python's configuration information.

iÿÿÿÿN(   t   pardirt   realpaths#   {base}/lib/python{py_version_short}t   stdlibs'   {platbase}/lib/python{py_version_short}t
   platstdlibs1   {base}/lib/python{py_version_short}/site-packagest   purelibs5   {platbase}/lib/python{py_version_short}/site-packagest   platlibs'   {base}/include/python{py_version_short}t   includes+   {platbase}/include/python{py_version_short}t   platincludes
   {base}/bint   scriptss   {base}t   datat   posix_prefixs   {base}/lib/pythons   {base}/include/pythont
   posix_homes
   {base}/Libs   {base}/Lib/site-packagess   {base}/Includes   {base}/Scriptst   ntt   os2s'   {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}t   os2_homes#   {userbase}/Python{py_version_nodot}s1   {userbase}/Python{py_version_nodot}/site-packagess+   {userbase}/Python{py_version_nodot}/Includes   {userbase}/Scriptst   nt_usert
   posix_users   {userbase}/lib/pythons#   {userbase}/lib/python/site-packagess   {userbase}/includet   osx_framework_useri    i   i   t   PYTHONBUILDDIRc         C   s'   y t  |  ƒ SWn t k
 r" |  SXd  S(   N(   R   t   OSError(   t   path(    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/sysconfig.pyt   _safe_realpathb   s    t   pcbuildiøÿÿÿs   \pc\viöÿÿÿt   pcs   vs9.0s   \pcbuild\amd64iòÿÿÿt   _PYTHON_PROJECT_BASEt   .c          C   s=   x6 d D]. }  t  j j t  j j t d |  ƒ ƒ r t Sq Wt S(   Ns
   Setup.dists   Setup.localt   Modules(   s
   Setup.dists   Setup.local(   t   osR   t   isfilet   joint   _PROJECT_BASEt   Truet   False(   t   fn(    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/sysconfig.pyt   is_python_buildƒ   s    $s   {projectbase}/Includes   {srcdir}c         C   sc   y |  j  | �  SWnK t k
 r^ y |  j  t j �  SWq_ t k
 rZ } t d | ƒ ‚ q_ Xn Xd  S(   Ns   {%s}(   t   formatt   KeyErrorR   t   environt   AttributeError(   t   st
   local_varst   var(    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/sysconfig.pyt   _subst_vars�   s    c         C   sI   |  j  ƒ  } x6 | j ƒ  D]( \ } } | | k r7 q n  | |  | <q Wd  S(   N(   t   keyst   items(   t   target_dictt
   other_dictt   target_keyst   keyt   value(    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/sysconfig.pyt   _extend_dict™   s
    c         C   s“   i  } | d  k r i  } n  t | t ƒ  ƒ xa t |  j ƒ  D]O \ } } t j d k rl t j j | ƒ } n  t j j	 t
 | | ƒ ƒ | | <q< W| S(   Nt   posixR   (   R3   R   (   t   NoneR2   t   get_config_varst   _INSTALL_SCHEMESR,   R   t   nameR   t
   expandusert   normpathR*   (   t   schemet   varst   resR0   R1   (    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/sysconfig.pyt   _expand_vars    s    	#c           C   s   t  j d k r d St  j S(   NR3   R
   (   R   R7   (    (    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/sysconfig.pyt   _get_default_scheme¬   s    c          C   s¿   t  j j d d  ƒ }  d „  } t  j d k r\ t  j j d ƒ pB d } |  rO |  S| | d ƒ St j d k r¨ t d ƒ } | r¨ |  r‡ |  S| d d	 | d
 t j d  ƒ Sn  |  r² |  S| d d ƒ S(   Nt   PYTHONUSERBASEc          W   s   t  j j t  j j |  Œ  ƒ S(   N(   R   R   R8   R   (   t   args(    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/sysconfig.pyt   joinuser´   s    R   t   APPDATAt   ~t   Pythont   darwint   PYTHONFRAMEWORKt   Librarys   %d.%di   s   .local(	   R   R%   t   getR4   R7   t   syst   platformt   get_config_vart   version_info(   t   env_baseRA   t   baset	   framework(    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/sysconfig.pyt   _getuserbase²   s    	
c         C   s  d d l  } | j d ƒ } | j d ƒ } | j d ƒ } | d k rN i  } n  i  } i  } t |  ƒ � } | j ƒ  }	 Wd QXxà |	 D]Ø }
 |
 j d ƒ s‚ |
 j ƒ  d k r¯ q‚ n  | j |
 ƒ } | r‚ | j d d	 ƒ \ } } | j ƒ  } | j	 d
 d ƒ } d | k r| | | <qZy t
 | ƒ } Wn' t k
 rL| j	 d
 d ƒ | | <qZX| | | <q‚ q‚ Wx^| r¾xQ| j ƒ  D]C} | | } | j | ƒ pŸ| j | ƒ } | r°| j d ƒ } t } | | k rÜt | | ƒ } nB | | k rñt } n- | t j k rt j | } n d | | <} | r·| | j ƒ  } | | j ƒ   | | } d | k re| | | <q­y t
 | ƒ } Wn! t k
 r˜| j ƒ  | | <n X| | | <| | =q·qt| | =qtWqaWx< | j ƒ  D]. \ } } t | t ƒ rÌ| j ƒ  | | <qÌqÌW| j | ƒ | S(   sÌ   Parse a Makefile-style file.

    A dictionary containing name/value pairs is returned.  If an
    optional dictionary is passed in as the second argument, it is
    used instead of a new dictionary.
    iÿÿÿÿNs"   ([a-zA-Z][a-zA-Z0-9_]+)\s*=\s*(.*)s   \$\(([A-Za-z][A-Za-z0-9_]*)\)s   \${([A-Za-z][A-Za-z0-9_]*)}t   #t    i   i   s   $$t   $(   t   ret   compileR4   t   opent	   readlinest
   startswitht   stript   matcht   groupt   replacet   intt
   ValueErrorR+   t   searchR   t   strR    R   R%   t   endt   startR,   t
   isinstancet   update(   t   filenameR;   RT   t   _variable_rxt   _findvar1_rxt   _findvar2_rxt   donet   notdonet   ft   linest   linet   mt   nt   vt   tmpvR7   R1   t   foundt   itemt   aftert   k(    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/sysconfig.pyt   _parse_makefileÆ   sp    	!	
	 
c           C   s5   t  r t j j t d ƒ St j j t d ƒ d d ƒ S(   s    Return the path of the Makefile.t   MakefileR   t   config(   t   _PYTHON_BUILDR   R   R   R   t   get_path(    (    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/sysconfig.pyt   get_makefile_filename  s    c       	   C   s;  d d l  }  i  } t ƒ  } y t | | ƒ WnL t k
 rz } d | } t | d ƒ rk | d | j } n  t | ƒ ‚ n Xt ƒ  } y& t | ƒ � } t | | ƒ Wd QXWnL t k
 rø } d | } t | d ƒ ré | d | j } n  t | ƒ ‚ n Xt	 r| d | d <n  d } d	 t
 j k rYd d l } | j | ƒ }	 | |	 _ |	 t
 j | <n  d
 t ƒ  t
 j d  f }
 t t
 d ƒ r�|
 d 7}
 n  y t j |
 ƒ Wn t k
 r³n Xt j j |
 | d ƒ } t | d ƒ �4 } | j d ƒ | j d ƒ |  j  | d | ƒWd QXt d d ƒ � } | j |
 ƒ Wd QXd S(   s;   Generate the Python module containing build-time variables.iÿÿÿÿNs.   invalid Python installation: unable to open %st   strerrors    (%s)t	   BLDSHAREDt   LDSHAREDt   _sysconfigdataRE   s   build/lib.%s-%si   t   gettotalrefcounts   -pydebugs   .pyt   wbsB   # system configuration generated and used by the sysconfig module
s   build_time_vars = t   streams   pybuilddir.txtt   w(   t   pprintR{   Rv   t   IOErrort   hasattrR|   t   get_config_h_filenameRV   t   parse_config_hRy   RI   RJ   t   impt
   new_modulet   build_time_varst   modulest   get_platformt   versionR   t   makedirsR   R   R   t   write(   R„   R;   t   makefilet   et   msgt   config_hRk   R7   R‰   t   modulet
   pybuilddirt   destfile(    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/sysconfig.pyt   _generate_posix_vars%  sR    	
	
	c         C   s!   d d l  m } |  j | ƒ d S(   s7   Initialize the module as appropriate for POSIX systems.iÿÿÿÿ(   R‹   N(   R   R‹   Rd   (   R;   R‹   (    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/sysconfig.pyt   _init_posixi  s    c         C   sq   t  d ƒ |  d <t  d ƒ |  d <t  d ƒ |  d <d |  d <d	 |  d
 <t |  d <t j j t t j ƒ ƒ |  d <d S(   s+   Initialize the module as appropriate for NTR   t   LIBDESTR   t
   BINLIBDESTR   t	   INCLUDEPYs   .pydt   SOs   .exet   EXEt   VERSIONt   BINDIRN(   Rz   t   _PY_VERSION_SHORT_NO_DOTR   R   t   dirnameR   RI   t
   executable(   R;   (    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/sysconfig.pyt   _init_non_posixo  s    


c   	      C   sï   d d l  } | d k r! i  } n  | j d ƒ } | j d ƒ } x© t rê |  j ƒ  } | s^ Pn  | j | ƒ } | r¼ | j d d ƒ \ } } y t | ƒ } Wn t k
 r® n X| | | <qB | j | ƒ } | rB d | | j d ƒ <qB qB W| S(   sÌ   Parse a config.h-style file.

    A dictionary containing name/value pairs is returned.  If an
    optional dictionary is passed in as the second argument, it is
    used instead of a new dictionary.
    iÿÿÿÿNs"   #define ([A-Z][A-Za-z0-9_]+) (.*)
s&   /[*] #undef ([A-Z][A-Za-z0-9_]+) [*]/
i   i   i    (	   RT   R4   RU   R   t   readlineRZ   R[   R]   R^   (	   t   fpR;   RT   t	   define_rxt   undef_rxRm   Rn   Ro   Rp   (    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/sysconfig.pyRˆ     s*    		  c          C   sU   t  r6 t j d k r- t j j t d ƒ }  qB t }  n t d ƒ }  t j j |  d ƒ S(   s   Returns the path of pyconfig.h.R   t   PCR   s
   pyconfig.h(   Ry   R   R7   R   R   R   Rz   (   t   inc_dir(    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/sysconfig.pyR‡   œ  s    	c          C   s    t  j ƒ  }  |  j ƒ  t |  ƒ S(   s-   Returns a tuple containing the schemes names.(   R6   R+   t   sortt   tuple(   t   schemes(    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/sysconfig.pyt   get_scheme_names§  s    
c           C   s   t  S(   s+   Returns a tuple containing the paths names.(   t   _SCHEME_KEYS(    (    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/sysconfig.pyt   get_path_names­  s    c         C   s   | r t  |  | ƒ St |  Sd S(   s±   Returns a mapping containing an install scheme.

    ``scheme`` is the install scheme name. If not provided, it will
    return the default scheme for the current platform.
    N(   R=   R6   (   R:   R;   t   expand(    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/sysconfig.pyt	   get_paths±  s    c         C   s   t  | | | ƒ |  S(   s\   Returns a path corresponding to the scheme.

    ``scheme`` is the install scheme name.
    (   R²   (   R7   R:   R;   R±   (    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/sysconfig.pyRz   ¼  s    c          G   sâ  d d l  } t d k r£i  a t t d <t t d <t t d <t t d <t d t d t d	 <t t d
 <t t d <t t d <t j	 d k r– t
 t ƒ n  t j	 d k r² t t ƒ n  t ƒ  t d <d t k rØ t t d <n  t rut j	 d k rut } y t j ƒ  } Wn t k
 rd } n Xt j j t d ƒ ru| | k rut j j | t d ƒ } t j j | ƒ t d <qun  t j d k r£d d l } | j t ƒ q£n  |  rÚg  } x$ |  D] } | j t j | ƒ ƒ q¶W| St Sd S(   sy  With no arguments, return a dictionary of all configuration
    variables relevant for the current platform.

    On Unix, this means every variable defined in Python's installed Makefile;
    On Windows and Mac OS it's a much smaller set.

    With arguments, return a list of values that result from looking up
    each argument in the configuration variable dictionary.
    iÿÿÿÿNt   prefixt   exec_prefixt
   py_versiont   py_version_shorti    i   t   py_version_nodotRN   t   platbaset   projectbaseR   R   R3   t   userbaset   srcdirRE   (   R   R   (   RT   t   _CONFIG_VARSR4   t   _PREFIXt   _EXEC_PREFIXt   _PY_VERSIONt   _PY_VERSION_SHORTR   R   R7   R¤   R™   RP   Ry   t   getcwdR   R   t   isabsR   R9   RI   RJ   t   _osx_supportt   customize_config_varst   appendRH   (   R@   RT   RN   t   cwdR»   RÃ   t   valsR7   (    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/sysconfig.pyR5   Ã  sJ    








c         C   s   t  ƒ  j |  ƒ S(   s“   Return the value of a single variable using the dictionary returned by
    'get_config_vars()'.

    Equivalent to get_config_vars().get(name)
    (   R5   RH   (   R7   (    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/sysconfig.pyRK   
  s    c          C   s­  d d l  }  t j d k r¢ d } t j j | ƒ } | d k rF t j St j j d | ƒ } t j | t | ƒ | !j ƒ  } | d k r‹ d S| d k r› d	 St j Sd
 t j	 k r¼ t j	 d
 St j d k sÛ t
 t d ƒ râ t j St j ƒ  \ } } } } }	 | j ƒ  j d d ƒ } |	 j d d ƒ }	 |	 j d d ƒ }	 | d  d k rWd | |	 f S| d  d k rÎ| d d k rœd } d t | d ƒ d | d f } i d d 6d d 6}
 |	 d  |
 t j 7}	 qœnÎ | d!  d" k rìd | | f S| d  d# k rd$ | | | f S| d%  d& k rYd& } |  j d' ƒ } | j | ƒ } | rœ| j ƒ  } qœnC | d%  d( k rœd d l } | j t ƒ  | | |	 ƒ \ } } }	 n  d) | | |	 f S(*   s«  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'.
    iÿÿÿÿNR   s    bit (t   )t   amd64s	   win-amd64t   itaniums   win-ia64t   _PYTHON_HOST_PLATFORMR3   t   unamet   /RR   t    t   _t   -i   t   linuxs   %s-%st   sunosi    t   5t   solariss   %d.%si   i   t   32bitiÿÿÿt   64bitIÿÿÿÿÿÿÿs   .%si   t   irixt   aixs   %s-%s.%si   t   cygwins   [\d.]+RE   s   %s-%s-%s(   RT   R   R7   RI   RŽ   t   findRJ   t   lent   lowerR%   R†   RÌ   R\   R]   t   maxintRU   RZ   R[   RÃ   t   get_platform_osxR5   (   RT   R³   t   it   jt   lookt   osnamet   hostt   releaseRŽ   t   machinet   bitnesst   rel_reRn   RÃ   (    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/sysconfig.pyR�     sZ     "c           C   s   t  S(   N(   RÀ   (    (    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/sysconfig.pyt   get_python_versionn  s    c         C   sZ   xS t  t | j ƒ  ƒ ƒ D]9 \ } \ } } | d k rC d |  GHn  d | | f GHq Wd  S(   Ni    s   %s: s
   	%s = "%s"(   t	   enumeratet   sortedR,   (   t   titleR	   t   indexR0   R1   (    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/sysconfig.pyt   _print_dictr  s    +c           C   sd   d t  j k r t ƒ  d Sd t ƒ  GHd t ƒ  GHd t ƒ  GHHt d t ƒ  ƒ Ht d t ƒ  ƒ d S(   s*   Display all information sysconfig detains.s   --generate-posix-varsNs   Platform: "%s"s   Python version: "%s"s!   Current installation scheme: "%s"t   Pathst	   Variables(	   RI   t   argvR˜   R�   Rè   R>   Rí   R²   R5   (    (    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/sysconfig.pyt   _mainy  s    t   __main__(   R   R   R   R   R   R   R	   (   R
   R   (?   t   __doc__RI   R   t   os.pathR    R   R6   R¯   RŽ   t   splitR¿   RÀ   R¡   R   R9   R³   R½   R´   R¾   R4   R¼   t
   _USER_BASER%   RH   t   _PYTHONBUILDDIRR   R   R£   R¢   RÁ   R7   RÜ   R   t   basenamet   abspathR"   Ry   R:   R*   R2   R=   R>   RP   Rv   R{   t   _get_makefile_filenameR˜   R™   R¤   Rˆ   R‡   R®   R°   R   R²   Rz   R5   RK   R�   Rè   Rí   Rñ   t   __name__(    (    (    s   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/sysconfig.pyt   <module>   s   			%%!6*$%!!								V		D						G		\			