‡Æ
9Oö9c       sy    d  Z   	 d Z  d k Z  d k Z  d k Z  d k Z  d k l Z  e i i	 e i
 ƒ Z  e i i	 e i ƒ Z  d e d „ Z 0 d d e d „ Z d d „  Z x d „  Z ~ d	 „  Z „ e d
 „ Z £ e i d ƒ Z ¤ e i d ƒ Z ¥ e i d ƒ Z § e d „ Z ð d „  Z 
e Z d „  Z <d „  Z Md „  Z ad „  Z ‚d „  Z  d S(   sí   Provide access to Python's configuration information.  The specific names
defined in the module depend heavily on the platform and configuration.

Written by:   Fred L. Drake, Jr.
Email:        <fdrake@acm.org>
Initial date: 17-Dec-1998
s8   $Id: sysconfig.py,v 1.28 2000/09/17 00:53:02 gward Exp $N(   s   DistutilsPlatformErrorc    sá    ! " | t j o # |  o t p t } n $ t i d j o( % t i i | d d t	 i
 d  ƒ Snr & t i d j o ' t i i | d ƒ SnE ( t i d j o ) t i i | d ƒ Sn + t d d	 t i ‚ d
 S(   s˜  Return the directory containing installed Python header files.

    If 'plat_specific' is false (the default), this is the path to the
    non-platform-specific header files, i.e. Python.h and so on;
    otherwise, this is the path to platform-specific header files
    (namely config.h).

    If 'prefix' is supplied, use it instead of sys.prefix or
    sys.exec_prefix -- i.e., ignore 'plat_specific'.
    s   posixs   includes   pythoni   s   nts   Includes   macs6   I don't know where Python installs its C header files s   on platform '%s'N(   s   prefixs   Nones   plat_specifics   EXEC_PREFIXs   PREFIXs   oss   names   paths   joins   syss   versions   DistutilsPlatformError(   s   plat_specifics   prefixs0   /mit/python/lib/python2.0/distutils/sysconfig.pys   get_python_inc s   
(i    c    s  0 = > | t j o ? |  o t p t } n A t i d j oX B t i i | C d d t	 i
 d  ƒ } D | o E | Sn G t i i | d ƒ Snâ I t i d j o/ J | o K t i i t d ƒ Sn M | Sn  O t i d j ou P |  o7 Q | o R t i i t d	 d
 ƒ Sn T t d ‚ n1 W | o X t i i t d ƒ Sn Z t d ‚ n ] t d d t i ‚ d S(   sI  Return the directory containing the Python library (standard or
    site additions).

    If 'plat_specific' is true, return the directory containing
    platform-specific modules, i.e. any module from a non-pure-Python
    module distribution; otherwise, return the platform-shared library
    directory.  If 'standard_lib' is true, return the directory
    containing standard Python library modules; otherwise, return the
    directory for site-specific modules.

    If 'prefix' is supplied, use it instead of sys.prefix or
    sys.exec_prefix -- i.e., ignore 'plat_specific'.
    s   posixs   libs   pythoni   s   site-packagess   nts   Libs   macs   Macs   Pluginss4   OK, where DO site-specific extensions go on the Mac?s1   OK, where DO site-specific modules go on the Mac?s/   I don't know where Python installs its library s   on platform '%s'N(   s   prefixs   Nones   plat_specifics   EXEC_PREFIXs   PREFIXs   oss   names   paths   joins   syss   versions	   libpythons   standard_libs   DistutilsPlatformError(   s   plat_specifics   standard_libs   prefixs	   libpythons0   /mit/python/lib/python2.0/distutils/sysconfig.pys   get_python_lib0 s,   




c    s«   d h i |  i d j oŽ j t d d d d d ƒ \ } } } } } m | d | } n |  i	 d | d	 p d
 | q d | d | r d | s d | ƒ u | |  _
 n d S(   sÑ   Do any platform-specific customization of the CCompiler instance
    'compiler'.  Mainly needed on Unix, so we can plug in the information
    that varies across Unices and is stored in Python's Makefile.
    s   unixs   CCs   OPTs   CCSHAREDs   LDSHAREDs   SOs    s   preprocessors    -Es   compilers   compiler_sos	   linker_sos
   linker_exeN(   s   compilers   compiler_types   get_config_varss   ccs   opts   ccshareds   ldshareds   so_exts   cc_cmds   set_executabless   shared_lib_extension(   s   compilers   ccs   opts   ccshareds   ldshareds   so_exts   cc_cmds0   /mit/python/lib/python2.0/distutils/sysconfig.pys   customize_compilerd s   *		c     s2   x y z t  d d ƒ }  { t i i |  d ƒ Sd S(   s0   Return full pathname of installed config.h file.s   plat_specifici   s   config.hN(   s   get_python_incs   inc_dirs   oss   paths   join(   s   inc_dirs0   /mit/python/lib/python2.0/distutils/sysconfig.pys   get_config_h_filenamex s   c     s;   ~  € t  d d d d ƒ }   t i i |  d d ƒ Sd S(   sA   Return full pathname of installed Makefile from the Python build.s   plat_specifici   s   standard_libs   configs   MakefileN(   s   get_python_libs   lib_dirs   oss   paths   join(   s   lib_dirs0   /mit/python/lib/python2.0/distutils/sysconfig.pys   get_makefile_filename~ s   c    s<  „ Š ‹ | t j o Œ h  } n  t i d ƒ } Ž t i d ƒ }  xä  d oÙ ‘ |  i ƒ  } ’ | o “ Pn ” | i	 | ƒ } • | oa – | i d d ƒ \ } } — y — t i | ƒ } Wn ˜ t j
 o
 ˜ n X™ | | | <n7 › | i	 | ƒ } œ | o  d | | i d ƒ <n qM Wž | Sd 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.
    s   #define ([A-Z][A-Z0-9_]+) (.*)
s#   /[*] #undef ([A-Z][A-Z0-9_]+) [*]/
i   i   i    N(   s   gs   Nones   res   compiles	   define_rxs   undef_rxs   fps   readlines   lines   matchs   ms   groups   ns   vs   strings   atois
   ValueError(   s   fps   gs	   define_rxs   undef_rxs   lines   ms   ns   vs0   /mit/python/lib/python2.0/distutils/sysconfig.pys   parse_config_h„ s,    

  
s"   ([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_]*)}c    s  § ® ¯ d k  l } ° | |  d d d d d d ƒ} ² | t j o ³ h  } n ´ h  } µ h  } · xæ · d oÛ ¸ | i ƒ  } ¹ | t j o º Pn » t
 i | ƒ } ¼ | o” ½ | i d d ƒ \ } }	 ¾ t i |	 ƒ }	 ¿ d |	 j o À |	 | | <nC Â y Â t i |	 ƒ }	 Wn Ã t j
 o
 Ã n XÄ |	 | | <n ql WÇ xÇ | oÈ xø| i ƒ  d È rå}
 É | |
 } Ê t i | ƒ p t i | ƒ } Ë | oœÌ | i d ƒ } Í | i | ƒ o¬ Î | | i ƒ  } Ï | | i ƒ   | | | } Ð d | j o Ñ | | |
 <nV Ó y Ó t i | ƒ } Wn Ô t j
 o
 Ô n XÕ t i | ƒ | |
 <Ö | |
 =nÈ × | i | ƒ o Ù n® Û d	 | | <Ü | | i ƒ  } Ý | | i ƒ   | } Þ d | j o ß | | |
 <nV á y á t i | ƒ } Wn â t j
 o
 â n Xã t i | ƒ | |
 <ä | |
 =n ç | |
 =qtWqXWé | i ƒ  ì | i | ƒ í | Sd
 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.

    (   s   TextFiles   strip_commentsi   s   skip_blankss
   join_linesi   s   $i    s    N(    s   distutils.text_files   TextFiles   fns   fps   gs   Nones   dones   notdones   readlines   lines   _variable_rxs   matchs   ms   groups   ns   vs   strings   strips   atois
   ValueErrors   keyss   names   values   _findvar1_rxs   searchs   _findvar2_rxs   has_keys   ends   afters   starts   closes   update(   s   fns   gs   TextFiles   fps   dones   notdones   lines   ms   ns   vs   names   values   afters0   /mit/python/lib/python2.0/distutils/sysconfig.pys   parse_makefile§ sv   !		 

   
 	"
    c    s¯   ð ÷ ÿ x˜ ÿ d o  t  i |  ƒ p t i |  ƒ } | oY | i d ƒ } | i ƒ  \ } } |  d | !| i | i d ƒ ƒ |  | }  n Pq W|  Sd S(   s¨  Expand Makefile-style variables -- "${foo}" or "$(foo)" -- in
    'string' according to 'vars' (a dictionary mapping variable names to
    values).  Variables not present in 'vars' are silently expanded to the
    empty string.  The variable values in 'vars' should not contain further
    variable expansions; if 'vars' is the output of 'parse_makefile()',
    you're fine.  Returns a variable-expanded version of 's'.
    i   i    N(   s   _findvar1_rxs   searchs   ss   _findvar2_rxs   ms   groups   names   spans   begs   ends   varss   get(   s   ss   varss   ms   names   begs   ends0   /mit/python/lib/python2.0/distutils/sysconfig.pys   expand_makefile_varsð s    
"
2	c  	   s¬  h  }  y  t ƒ  } t | |  ƒ Wn\ t j
 oM } d | } t | d ƒ o | d | i } n t	 | ‚ n Xt
 i d j oj !t d d ƒ } "t i i | d d ƒ } #t i i | d d	 ƒ } %d
 | |  d | f |  d <n 't
 i d j o{ ,t d d ƒ } -t i i t i |  d ƒ d ƒ } .t i i | d | ƒ } 5d | t t
 i d d !f |  d <n 89|  a d S(   s7   Initialize the module as appropriate for POSIX systems.s.   invalid Python installation: unable to open %ss   strerrors    (%s)s   aix4s   standard_libi   s   configs	   ld_so_aixs
   python.exps   %s %s -bI:%ss   CCs   LDSHAREDs   beosi    s   %s -L%s/lib -lpython%si   N(   s   gs   get_makefile_filenames   filenames   parse_makefiles   IOErrors   msgs   my_msgs   hasattrs   strerrors   DistutilsPlatformErrors   syss   platforms   get_python_libs
   python_libs   oss   paths   joins	   ld_so_aixs
   python_exps   basenames   strings   splits   linkerscript_names   linkerscripts   PREFIXs   versions   _config_vars(	   s   gs   filenames   msgs   my_msgs
   python_libs	   ld_so_aixs
   python_exps   linkerscript_names   linkerscripts0   /mit/python/lib/python2.0/distutils/sysconfig.pys   _init_posixs,   	"&(c     s‡   <=>h  }  @t d d d d ƒ |  d <At d d d d ƒ |  d <Dt d d ƒ |  d <Fd |  d	 <Gd
 |  d <IJ|  a d S(   s+   Initialize the module as appropriate for NTs   plat_specifici    s   standard_libi   s   LIBDESTs
   BINLIBDESTs	   INCLUDEPYs   .pyds   SOs   .exes   EXEN(   s   gs   get_python_libs   get_python_incs   _config_vars(   s   gs0   /mit/python/lib/python2.0/distutils/sysconfig.pys   _init_nt<s   	c     sµ   MNOh  }  Qt d d d d ƒ |  d <Rt d d d d ƒ |  d <Ut d d ƒ |  d <Wd |  d	 <Zt i i t d
 ƒ |  d <[t i i t d d
 ƒ |  d <]^|  a d S(   s:   Initialize the module as appropriate for Macintosh systemss   plat_specifici    s   standard_libi   s   LIBDESTs
   BINLIBDESTs	   INCLUDEPYs   .ppc.slbs   SOs   Libs   install_libs   Macs   install_platlibN(   s   gs   get_python_libs   get_python_incs   oss   paths   joins   EXEC_PREFIXs   _config_vars(   s   gs0   /mit/python/lib/python2.0/distutils/sysconfig.pys	   _init_macMs   	c     sß   ajklt  t j ok md k l } nt ƒ  i d t i ƒ } o| o p| ƒ  n
 rh  a  wt t  d <xt	 t  d <n z|  oF {g  } |x, |  d |r } }| i t  i | ƒ ƒ q£ W~| Sn €t  Sd S(   sê  With no arguments, return a dictionary of all configuration
    variables relevant for the current platform.  Generally this includes
    everything needed to build extensions and install both pure modules and
    extensions.  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.
    (   s   pprints   _init_s   prefixs   exec_prefixi    N(   s   _config_varss   Nones   pprints   globalss   gets   oss   names   funcs   PREFIXs   EXEC_PREFIXs   argss   valss   append(   s   argss   pprints   funcs   valss   names0   /mit/python/lib/python2.0/distutils/sysconfig.pys   get_config_varsas"   	
	
	 	c    s   ‚†‡t  ƒ  i |  ƒ Sd S(   s•   Return the value of a single variable using the dictionary
    returned by 'get_config_vars()'.  Equivalent to
      get_config_vars().get(name)
    N(   s   get_config_varss   gets   name(   s   names0   /mit/python/lib/python2.0/distutils/sysconfig.pys   get_config_var‚s   (!   s   __doc__s   __revision__s   oss   res   strings   syss   errorss   DistutilsPlatformErrors   paths   normpaths   prefixs   PREFIXs   exec_prefixs   EXEC_PREFIXs   Nones   get_python_incs   get_python_libs   customize_compilers   get_config_h_filenames   get_makefile_filenames   parse_config_hs   compiles   _variable_rxs   _findvar1_rxs   _findvar2_rxs   parse_makefiles   expand_makefile_varss   _config_varss   _init_posixs   _init_nts	   _init_macs   get_config_varss   get_config_var(    s0   /mit/python/lib/python2.0/distutils/sysconfig.pys   ? s2   	4I	0!