;
Ñâ"Ic               @   sn   d  Z  d Z d d l Z d d l Z y d d l Z Wn e k
 o d Z Yn XGd „  d ƒ Z d „  Z d S(   um   distutils.extension

Provides the Extension class, used to describe C/C++ extension
modules in setup scripts.u?   $Id: extension.py 58495 2007-10-16 18:12:55Z guido.van.rossum $i    Nc             B   sD   |  Ee  Z d  Z d d d d d d d d d d d d d d „ Z d S(   u4  Just a collection of attributes that describes an extension
    module and everything needed to build it (hopefully in a portable
    way, but there are hooks that let you be as unportable as you need).

    Instance attributes:
      name : string
        the full name of the extension, including any packages -- ie.
        *not* a filename or pathname, but Python dotted name
      sources : [string]
        list of source filenames, relative to the distribution root
        (where the setup script lives), in Unix form (slash-separated)
        for portability.  Source files may be C, C++, SWIG (.i),
        platform-specific resource files, or whatever else is recognized
        by the "build_ext" command as source for a Python extension.
      include_dirs : [string]
        list of directories to search for C/C++ header files (in Unix
        form for portability)
      define_macros : [(name : string, value : string|None)]
        list of macros to define; each macro is defined using a 2-tuple,
        where 'value' is either the string to define it to or None to
        define it without a particular value (equivalent of "#define
        FOO" in source or -DFOO on Unix C compiler command line)
      undef_macros : [string]
        list of macros to undefine explicitly
      library_dirs : [string]
        list of directories to search for C/C++ libraries at link time
      libraries : [string]
        list of library names (not filenames or paths) to link against
      runtime_library_dirs : [string]
        list of directories to search for C/C++ libraries at run time
        (for shared extensions, this is when the extension is loaded)
      extra_objects : [string]
        list of extra files to link with (eg. object files not implied
        by 'sources', static library that must be explicitly specified,
        binary resource files, etc.)
      extra_compile_args : [string]
        any extra platform- and compiler-specific information to use
        when compiling the source files in 'sources'.  For platforms and
        compilers where "command line" makes sense, this is typically a
        list of command-line arguments, but for other platforms it could
        be anything.
      extra_link_args : [string]
        any extra platform- and compiler-specific information to use
        when linking object files together to create the extension (or
        to create a new static Python interpreter).  Similar
        interpretation as for 'extra_compile_args'.
      export_symbols : [string]
        list of symbols to be exported from a shared extension.  Not
        used on all platforms, and not generally necessary for Python
        extensions, which typically export exactly one symbol: "init" +
        extension_name.
      swig_opts : [string]
        any extra options to pass to SWIG if a source file has the .i
        extension.
      depends : [string]
        list of files that the extension depends on
      language : string
        extension language (i.e. "c", "c++", "objc"). Will be detected
        from the source extensions if not provided.
    c             K   sJ  | |  _  | |  _ | p g  |  _ | p g  |  _ | p g  |  _ | p g  |  _ | p g  |  _ | p g  |  _ |	 p g  |  _ |
 p g  |  _	 | p g  |  _
 | p g  |  _ | p g  |  _ | p g  |  _ | |  _ t | ƒ o^ t t t | ƒ ƒ } d d j | ƒ } t d  k	 o t j | ƒ qFt j j | d ƒ n d  S(   Nu   Unknown Extension options: u   , u   
(   u   nameu   sourcesu   include_dirsu   define_macrosu   undef_macrosu   library_dirsu	   librariesu   runtime_library_dirsu   extra_objectsu   extra_compile_argsu   extra_link_argsu   export_symbolsu	   swig_optsu   dependsu   languageu   lenu   mapu   repru   sortedu   joinu   warningsu   Noneu   warnu   sysu   stderru   write(   u   selfu   nameu   sourcesu   include_dirsu   define_macrosu   undef_macrosu   library_dirsu	   librariesu   runtime_library_dirsu   extra_objectsu   extra_compile_argsu   extra_link_argsu   export_symbolsu	   swig_optsu   dependsu   languageu   kwu   Lu   msg(    (    u0   /mit/python/lib/python3.0/distutils/extension.pyu   __init__Y   s*    			N(   u   __name__u
   __module__u   __doc__u   Noneu   __init__(   u
   __locals__(    (    u0   /mit/python/lib/python3.0/distutils/extension.pyu	   Extension   s   
<u	   Extensionc             C   sÅ  d d l  m } m } m } d d l m } d d l m } | |  ƒ } | |  d d d d d d d	 d d
 d ƒ} g  } xF| j ƒ  }	 |	 d  k o Pn | j
 |	 ƒ o q{ n |	 d |	 d k o
 d k n o | j d |	 ƒ q{ n | |	 | ƒ }	 | |	 ƒ }
 |
 d } t | g  ƒ } d  } x†|
 d d  … D]t} | d  k	 o | j | ƒ d  } q9n t j j | ƒ d } | d d … } | d d  … } | d( k o | j j | ƒ q9| d k o | j j | ƒ q9| d k oh | j d ƒ } | d k o | j j | d  f ƒ q­| j j | d | … | | d d  … f ƒ q9| d k o | j j | ƒ q9| d k o | j j | ƒ q9| d k o | j j | ƒ q9| d k o | j j | ƒ q9| d k o | j j | ƒ q9| d k o | j } q9| d k o | j } q9| d  k o | j } q9| d! k o( | j j | ƒ | p | j } q­q9| d) k o | j j | ƒ q9| j d' | ƒ q9W| j | ƒ q{ | S(*   Ni    (   u   parse_makefileu   expand_makefile_varsu   _variable_rx(   u   TextFile(   u   split_quotedu   strip_commentsi   u   skip_blanksu
   join_linesu	   lstrip_wsu	   rstrip_wsiÿÿÿÿu   *u   '%s' lines not handled yeti   u   .cu   .ccu   .cppu   .cxxu   .c++u   .mu   .mmu   -Iu   -Du   =u   -Uu   -Cu   -lu   -Lu   -Ru   -rpathu   -Xlinkeru
   -Xcompileru   -uu   .au   .sou   .slu   .ou   .dylibu   unrecognized argument '%s'(   u   .cu   .ccu   .cppu   .cxxu   .c++u   .mu   .mm(   u   .au   .sou   .slu   .ou   .dylib(   u   distutils.sysconfigu   parse_makefileu   expand_makefile_varsu   _variable_rxu   distutils.text_fileu   TextFileu   distutils.utilu   split_quotedu   readlineu   Noneu   matchu   warnu	   Extensionu   appendu   osu   pathu   splitextu   sourcesu   include_dirsu   findu   define_macrosu   undef_macrosu   extra_compile_argsu	   librariesu   library_dirsu   runtime_library_dirsu   extra_link_argsu   extra_objects(   u   filenameu   parse_makefileu   expand_makefile_varsu   _variable_rxu   TextFileu   split_quotedu   varsu   fileu
   extensionsu   lineu   wordsu   moduleu   extu   append_next_wordu   wordu   suffixu   switchu   valueu   equals(    (    u0   /mit/python/lib/python3.0/distutils/extension.pyu   read_setup_fileˆ   s„    	&	
  (	   u   __doc__u   __revision__u   osu   sysu   warningsu   ImportErroru   Noneu	   Extensionu   read_setup_file(    (    (    u0   /mit/python/lib/python3.0/distutils/extension.pyu   <module>   s   o