-í
ë¶<c       sî     d  Z   . d Z 0 d k Z d k Z d k Z 1 d k l Z l Z 2 d k l	 Z	 3 d k
 l Z 4 d k l Z l Z l Z 6 d e	 f d „  ƒ  YZ 0d	 e f d
 „  ƒ  YZ Vd Z Wd Z Xd Z Zd „  Z d „  Z d S(   s  distutils.cygwinccompiler

Provides the CygwinCCompiler class, a subclass of UnixCCompiler that
handles the Cygwin port of the GNU C compiler to Windows.  It also contains
the Mingw32CCompiler class which handles the mingw32 port of GCC (same as
cygwin in no-cygwin mode).
s?   $Id: cygwinccompiler.py,v 1.14 2001/12/06 20:51:35 fdrake Exp $N(   s   gen_preprocess_optionss   gen_lib_options(   s   UnixCCompiler(   s
   write_file(   s   DistutilsExecErrors   CompileErrors   UnknownFileErrors   CygwinCCompilerc    
  s¶   6 t  Z 8 d Z 9 d Z : d Z ; d Z < d Z = d Z > d Z @ d d d d	 „ Z	 z e
 e
 e
 d e
 e
 d
 „ Z ® e
 e
 e
 e
 e
 d e
 e
 e
 d „	 Z d d d „ Z RS(   Ns   cygwins   .os   .as   .dlls   lib%s%ss   %s%ss   .exei    c  
  sm  @ E t  i |  | | | ƒ G t ƒ  \ } } H |  i	 d | | f ƒ J | t
 j	 o  K |  i d d | d ƒ n P t ƒ  \ |  _ |  _ |  _ R |  i	 |  i d |  i |  i |  i f ƒ \ |  i d j o ] d |  _ n _ d |  _ c |  i d	 d
 d d d e d d f d d |  i ƒ j |  i d j o# m d g |  _ n |  i d ƒ n q g  |  _ d  S(   Ns%   Python's GCC status: %s (details: %s)s<   Python's pyconfig.h doesn't seem to support your compiler.  s   Reason: %s.s<   Compiling may fail because of undefined preprocessor macros.s   : gcc %s, ld %s, dllwrap %s
s   2.10.90s   gccs   dllwraps   compilers   gcc -mcygwin -O -Walls   compiler_sos   gcc -mcygwin -mdll -O -Walls
   linker_exes   gcc -mcygwins	   linker_sos   %s -mcygwin -mdll -statics   2.91.57s   msvcrts,   Consider upgrading to a newer version of gcc(   s   UnixCCompilers   __init__s   selfs   verboses   dry_runs   forces   check_config_hs   statuss   detailss   debug_prints   CONFIG_H_OKs   warns   get_versionss   gcc_versions
   ld_versions   dllwrap_versions   compiler_types
   linker_dlls   set_executabless   dll_libraries(   s   selfs   verboses   dry_runs   forces   statuss   details(    (    s/   /usr/lib/python2.2/distutils/cygwinccompiler.pys   __init__@ s$    -
		c    s!  z ƒ |  i | | | ƒ \ } } } … |  i | | ƒ \ }	 } ˆ t	 | | ƒ } ‰ | d g } Š | o ‹ d g | d *n Œ | o  | | d *n Ž | t j o  g  } n “ xYt t | ƒ ƒ D“ ]B} ” | | }
 |	 | } • t i i |
 ƒ d } – | |
 o — |  i d |
 | f ƒ ná ™ |  i t i i | ƒ ƒ š | d j p
 | d j oQ œ y#  |  i d d	 |
 d
 | g ƒ Wn$ ž t j
 o } Ÿ t | ‚ n XnW ¡ y, ¢ |  i |  i  | |
 d
 | g | ƒ Wn$ ¥ t j
 o } ¦ t | ‚ n XqÍ W© |	 Sd  S(   Ns   -cs   -gi    i   s   skipping %s (%s up-to-date)s   .rcs   .ress   windress   -is   -o(!   s   selfs   _fix_compile_argss
   output_dirs   macross   include_dirss   _prep_compiles   sourcess   objectss   skip_sourcess   gen_preprocess_optionss   pp_optss   cc_argss   debugs   extra_preargss   extra_postargss   Nones   ranges   lens   is   srcs   objs   oss   paths   splitexts   exts   announces   mkpaths   dirnames   spawns   DistutilsExecErrors   msgs   CompileErrors   compiler_so(   s   selfs   sourcess
   output_dirs   macross   include_dirss   debugs   extra_preargss   extra_postargss   pp_optss   objectss   srcs   skip_sourcess   objs   cc_argss   is   exts   msg(    (    s/   /usr/lib/python2.2/distutils/cygwinccompiler.pys   compilez s6   	!

 	#,c    sd  ® ½ t  i  |
 p g  ƒ }
 ¾ t  i  | p g  ƒ } ¿ t  i  | p g  ƒ } Â | i |  i ƒ Æ | t j	 o | |  i
 j p |  i d j oXÐ t i i | d ƒ } Ò t i i t i i | ƒ ƒ \ } } Ö t i i | | d ƒ } × t i i | | d ƒ } Ø t i i | d | d ƒ } Û d t i i | ƒ d g } Þ x! | DÞ ] } ß | i | ƒ qRWà |  i t | | f á d	 | ƒ æ |  i d
 j o0 ç |
 i d | g ƒ ë |
 i d | g ƒ n ñ | i | ƒ n ü |	 o ý |
 i d ƒ n ÿ t i  |   | | | | | | | t |	 	|
 
| | ƒ d  S(   Ns   gcci    s   .defs   .exps   libs   .as
   LIBRARY %ss   EXPORTSs
   writing %ss   dllwraps   --output-libs   --defs   -s(&   s   copys   extra_preargss	   librariess   objectss   extends   selfs   dll_librariess   export_symbolss   Nones   target_descs
   EXECUTABLEs
   linker_dlls   oss   paths   dirnames   temp_dirs   splitexts   basenames   output_filenames   dll_names   dll_extensions   joins   def_files   exp_files   lib_files   contentss   syms   appends   executes
   write_files   debugs   UnixCCompilers   links
   output_dirs   library_dirss   runtime_library_dirss   extra_postargss
   build_temp(   s   selfs   target_descs   objectss   output_filenames
   output_dirs	   librariess   library_dirss   runtime_library_dirss   export_symbolss   debugs   extra_preargss   extra_postargss
   build_temps   dll_names   lib_files   syms   dll_extensions   exp_files   contentss   def_files   temp_dir(    (    s/   /usr/lib/python2.2/distutils/cygwinccompiler.pys   link® sF   0
' 
 	s    c    sC  | t j o d } n g  } x	| D]þ } t i i t i i | ƒ ƒ \ } } | |  i d d g j o t d | | f ‚ n | o  t i i | ƒ } n !| d j p
 | d j o1 #| i t i i | $| | |  i ƒ ƒ n* &| i t i i | '| |  i ƒ ƒ q3 W(| Sd  S(   Ns    s   .rcs   .ress"   unknown file type '%s' (from '%s')(   s
   output_dirs   Nones	   obj_namess   source_filenamess   src_names   oss   paths   splitexts   normcases   bases   exts   selfs   src_extensionss   UnknownFileErrors	   strip_dirs   basenames   appends   joins   obj_extension(   s   selfs   source_filenamess	   strip_dirs
   output_dirs	   obj_namess   exts   bases   src_name(    (    s/   /usr/lib/python2.2/distutils/cygwinccompiler.pys   object_filenamess     	
 	'
(   s   __name__s
   __module__s   compiler_types   obj_extensions   static_lib_extensions   shared_lib_extensions   static_lib_formats   shared_lib_formats   exe_extensions   __init__s   Nones   compiles   links   object_filenames(    (    (    s/   /usr/lib/python2.2/distutils/cygwinccompiler.pys   CygwinCCompiler6 s   								:4'ds   Mingw32CCompilerc      s)   0t  Z 2d Z 4d d d d „ Z RS(   Ns   mingw32i    c    s   49t  i |  | | | ƒ =|  i d j o >d } n
 @d } B|  i d d Cd d Dd d	 Ed
 d |  i	 | f ƒ Lg  |  _
 d  S(   Ns   2.91.57s   --entry _DllMain@12s    s   compilers   gcc -mno-cygwin -O -Walls   compiler_sos   gcc -mno-cygwin -mdll -O -Walls
   linker_exes   gcc -mno-cygwins	   linker_sos   %s -mno-cygwin -mdll -static %s(   s   CygwinCCompilers   __init__s   selfs   verboses   dry_runs   forces   gcc_versions   entry_points   set_executabless
   linker_dlls   dll_libraries(   s   selfs   verboses   dry_runs   forces   entry_point(    (    s/   /usr/lib/python2.2/distutils/cygwinccompiler.pys   __init__4s   			(   s   __name__s
   __module__s   compiler_types   __init__(    (    (    s/   /usr/lib/python2.2/distutils/cygwinccompiler.pys   Mingw32CCompiler0s   		s   oks   not oks	   uncertainc     s  Zjod k  l } pd k }  s|  i t i d ƒ d j o tt d f Sn v| i ƒ  } wy/ zt	 | ƒ } {| i ƒ  } || i ƒ  Wn2 ~t j
 o# } t d | | i f f SnD X†|  i | d ƒ d j o ‡t d | f Sn ‰t d	 | f Sd S(
   s¡  Check if the current Python installation (specifically, pyconfig.h)
    appears amenable to building extensions with GCC.  Returns a tuple
    (status, details), where 'status' is one of the following constants:
      CONFIG_H_OK
        all is well, go ahead and compile
      CONFIG_H_NOTOK
        doesn't look good
      CONFIG_H_UNCERTAIN
        not sure -- unable to read pyconfig.h
    'details' is a human-readable string explaining the situation.

    Note there are two ways to conclude "OK": either 'sys.version' contains
    the string "GCC" (implying that this Python was built with GCC), or the
    installed "pyconfig.h" contains the string "__GNUC__".
    (   s	   sysconfigNs   GCCi    s   sys.version mentions 'GCC's   couldn't read '%s': %ss   __GNUC__s   '%s' mentions '__GNUC__'s    '%s' does not mention '__GNUC__'(   s	   distutilss	   sysconfigs   strings   finds   syss   versions   CONFIG_H_OKs   get_config_h_filenames   fns   opens   fs   reads   ss   closes   IOErrors   excs   CONFIG_H_UNCERTAINs   strerrors   CONFIG_H_NOTOK(   s   strings   fs	   sysconfigs   ss   fns   exc(    (    s/   /usr/lib/python2.2/distutils/cygwinccompiler.pys   check_config_hZs   c     s#  ‘d k  l } ’d k l }  “d k } •|  d ƒ } –| o} —t i | d d ƒ } ˜| i	 ƒ  }
 ™| i ƒ  š| i d |
 ƒ } ›| o œ| | i d ƒ ƒ } n
 žt } n
  t } ¡|  d	 ƒ } ¢| o} £t i | d
 d ƒ } ¤| i	 ƒ  }
 ¥| i ƒ  ¦| i d |
 ƒ } §| o ¨| | i d ƒ ƒ } n
 ªt } n
 ¬t } ­|  d ƒ } ®| o} ¯t i | d d ƒ } °| i	 ƒ  }
 ±| i ƒ  ²| i d |
 ƒ } ³| o ´| | i d ƒ ƒ }	 n
 ¶t }	 n
 ¸t }	 ¹| | |	 f Sd S(   sj    Try to find out the versions of gcc, ld and dllwrap.
        If not possible it returns None for it.
    (   s   StrictVersion(   s   find_executableNs   gccs    -dumpversions   rs   (\d+\.\d+\.\d+)i   s   lds    -vs   dllwraps
    --versions    (\d+\.\d+\.\d+)(   s   distutils.versions   StrictVersions   distutils.spawns   find_executables   res   gcc_exes   oss   popens   outs   reads
   out_strings   closes   searchs   results   groups   gcc_versions   Nones   ld_exes
   ld_versions   dllwrap_exes   dllwrap_version(   s   find_executables   dllwrap_exes
   ld_versions   StrictVersions   res   gcc_versions   results   ld_exes   gcc_exes   dllwrap_versions
   out_strings   out(    (    s/   /usr/lib/python2.2/distutils/cygwinccompiler.pys   get_versionssF   

	

	

	(   s   __doc__s   __revision__s   oss   syss   copys   distutils.ccompilers   gen_preprocess_optionss   gen_lib_optionss   distutils.unixccompilers   UnixCCompilers   distutils.file_utils
   write_files   distutils.errorss   DistutilsExecErrors   CompileErrors   UnknownFileErrors   CygwinCCompilers   Mingw32CCompilers   CONFIG_H_OKs   CONFIG_H_NOTOKs   CONFIG_H_UNCERTAINs   check_config_hs   get_versions(   s   __revision__s   DistutilsExecErrors   CONFIG_H_UNCERTAINs   gen_preprocess_optionss   Mingw32CCompilers   get_versionss   gen_lib_optionss   CONFIG_H_NOTOKs   check_config_hs   UnixCCompilers   syss   CygwinCCompilers   CompileErrors
   write_files   copys   oss   UnknownFileErrors   CONFIG_H_OK(    (    s/   /usr/lib/python2.2/distutils/cygwinccompiler.pys   ? s   '	ú&			3