-ν
μΆ<c       si   d  Z  d Z d k Z d k Z d k Td k l Z d k Td k l	 Z	 d   Z
 d e f d     YZ d S(	   s΄   distutils.command.build_clib

Implements the Distutils 'build_clib' command, to build a C/C++ library
that is included in the module distribution and needed by an extension
module.s:   $Id: build_clib.py,v 1.24 2001/12/06 20:59:17 fdrake Exp $N(   s   *(   s   Command(   s   customize_compilerc     s   d k  l }  |    d  S(   N(   s   show_compilers(   s   distutils.ccompilers   show_compilers(   s   show_compilers(    (    s2   /usr/lib/python2.2/distutils/command/build_clib.pys   show_compilers s    s
   build_clibc      s°   t  Z d Z d d d f d d d f d d	 d
 f d d d f d d d f g Z d d g Z d e d e f g Z d   Z d   Z	 d   Z
 d   Z d   Z d   Z d   Z RS(   Ns/   build C/C++ libraries used by Python extensionss
   build-clibs   bs%   directory to build C/C++ libraries tos
   build-temps   ts,   directory to put temporary build by-productss   debugs   gs"   compile with debugging informations   forces   fs2   forcibly build everything (ignore file timestamps)s	   compiler=s   cs   specify the compiler types   help-compilers   list available compilersc    sU   t  |  _ t  |  _ t  |  _ t  |  _ t  |  _ t  |  _ t  |  _ d |  _	 t  |  _
 d  S(   Ni    (   s   Nones   selfs
   build_clibs
   build_temps	   librariess   include_dirss   defines   undefs   debugs   forces   compiler(   s   self(    (    s2   /usr/lib/python2.2/distutils/command/build_clib.pys   initialize_options: s    								c    sΚ   |  i d d d f d d f d d f d d f d d f  |  i i |  _ |  i o |  i |  i  n |  i t j o |  i i p g  |  _ n t |  i  t j o t	 i
 |  i t i  |  _ n d  S(   Ns   builds
   build_temps
   build_clibs   compilers   debugs   force(   s   selfs   set_undefined_optionss   distributions	   librariess   check_library_lists   include_dirss   Nones   types
   StringTypes   strings   splits   oss   pathsep(   s   self(    (    s2   /usr/lib/python2.2/distutils/command/build_clib.pys   finalize_optionsL s    					
c  	  s  |  i o d  Sn d k l } | d |  i d |  i d |  i d |  i  |  _ t |  i  |  i	 t
 j	 o |  i i |  i	  n |  i t
 j	 o1 x* |  i D] \ } } |  i i | |  q Wn |  i t
 j	 o( x! |  i D] } |  i i |  qί Wn |  i |  i  d  S(   N(   s   new_compilers   compilers   verboses   dry_runs   force(   s   selfs	   librariess   distutils.ccompilers   new_compilers   compilers   verboses   dry_runs   forces   customize_compilers   include_dirss   Nones   set_include_dirss   defines   names   values   define_macros   undefs   macros   undefine_macros   build_libraries(   s   selfs   new_compilers   macros   values   name(    (    s2   /usr/lib/python2.2/distutils/command/build_clib.pys   runj s&    		
 
 c    s  t  |  t j	 o t d  n xί | D]Χ } t  |  t j	 o t |  d j o t d  n t  | d  t j	 o t d d  n d | d j p! t i	 d j o t i	 | d j o t d d	 | d  n t  | d
  t
 j	 o t d d  n q' Wd S(   s:  Ensure that the list of libraries (presumably provided as a
           command option 'libraries') is valid, i.e. it is a list of
           2-tuples, where the tuples are (library_name, build_info_dict).
           Raise DistutilsSetupError if the structure is invalid anywhere;
           just returns otherwise.s+   'libraries' option must be a list of tuplesi   s*   each element of 'libraries' must a 2-tuplei    s+   first element of each tuple in 'libraries' s#   must be a string (the library name)s   /s   bad library name '%s': s$   may not contain directory separatorsi   s,   second element of each tuple in 'libraries' s!   must be a dictionary (build info)N(   s   types	   librariess   ListTypes   DistutilsSetupErrors   libs	   TupleTypes   lens
   StringTypes   oss   seps   DictionaryType(   s   selfs	   librariess   lib(    (    s2   /usr/lib/python2.2/distutils/command/build_clib.pys   check_library_list s      &5c    sH   |  i o t Sn g  } x$ |  i D] \ } } | i |  q# W| Sd  S(   N(   s   selfs	   librariess   Nones	   lib_namess   lib_names
   build_infos   append(   s   selfs	   lib_namess
   build_infos   lib_name(    (    s2   /usr/lib/python2.2/distutils/command/build_clib.pys   get_library_names¬ s    
 c    s   |  i |  i  g  } xj |  i D]_ \ } } | i d  } | t j p t	 |  t
 t f j o t d |  n | i |  q  W| Sd  S(   Ns   sourcessf   in 'libraries' option (library '%s'), 'sources' must be present and must be a list of source filenames(   s   selfs   check_library_lists	   librariess	   filenamess   lib_names
   build_infos   gets   sourcess   Nones   types   ListTypes	   TupleTypes   DistutilsSetupErrors   extend(   s   selfs   sourcess
   build_infos   lib_names	   filenames(    (    s2   /usr/lib/python2.2/distutils/command/build_clib.pys   get_source_files» s    
 &c    sω   xς | D]κ \ } } | i d  } | t j p t |  t t f j o t	 d d d |  n t
 |  } |  i d |  | i d  } | i d  } |  i i | d |  i d | d | d	 |  i } |  i i | | d |  i d	 |  i q Wd  S(
   Ns   sourcess&   in 'libraries' option (library '%s'), s&   'sources' must be present and must be s   a list of source filenamess   building '%s' librarys   macross   include_dirss
   output_dirs   debug(   s	   librariess   lib_names
   build_infos   gets   sourcess   Nones   types   ListTypes	   TupleTypes   DistutilsSetupErrors   lists   selfs   announces   macross   include_dirss   compilers   compiles
   build_temps   debugs   objectss   create_static_libs
   build_clib(   s   selfs	   librariess
   build_infos   macross   sourcess   objectss   lib_names   include_dirs(    (    s2   /usr/lib/python2.2/distutils/command/build_clib.pys   build_librariesΝ s"     &		(   s   __name__s
   __module__s   descriptions   user_optionss   boolean_optionss   Nones   show_compilerss   help_optionss   initialize_optionss   finalize_optionss   runs   check_library_lists   get_library_namess   get_source_filess   build_libraries(    (    (    s2   /usr/lib/python2.2/distutils/command/build_clib.pys
   build_clib" s   B				&		(   s   __doc__s   __revision__s   oss   strings   typess   distutils.cores   Commands   distutils.errorss   distutils.sysconfigs   customize_compilers   show_compilerss
   build_clib(   s   customize_compilers   __revision__s   Commands   strings   show_compilerss
   build_clibs   os(    (    s2   /usr/lib/python2.2/distutils/command/build_clib.pys   ? s   	