-í
ç¶<c       s’   d  Z  d k Z d k Z d k Z d k Z d d g Z d e d e d „ Z d d d d „ Z d	 „  Z	 e
 d
 j o e	 ƒ  Z e i e ƒ n d S(   sí  Module/script to "compile" all .py files to .pyc (or .pyo) file.

When called as a script with arguments, this compiles the directories
given as arguments recursively; the -l option prevents it from
recursing into directories.

Without arguments, if compiles all modules on sys.path, without
recursing into subdirectories.  (Even though it should do so for
packages -- for now, you'll have to deal with packages separately.)

See module py_compile for details of the actual byte-compilation.

Ns   compile_dirs   compile_pathi
   i    c    sÇ  d G|  Gd GHy t i |  ƒ } Wn% t i j
 o d G|  GHg  } n X| i ƒ  d } xd| D]\}
 t i i	 |  |
 ƒ } | o t i i	 | |
 ƒ } n t } | o! | i | ƒ } | o q_ n n t i i | ƒ o`|
 d  |
 d f \ } } | d j o5| t o d p d } t i | ƒ t i } y t i | ƒ t i } Wn t i j
 o d	 } n X| | j o | o q_ n d
 G| Gd GHy t i | t | ƒ }	 Wnn t j
 o t ‚ nn t t  i! ƒ t d ƒ j o t  i! } n t  i! i# } d G| d Gt  i$ GHd	 } n X|	 d	 j o
 d	 } n n n | d	 j oD |
 t i& j o4 |
 t i' j o$ t i i( | ƒ o t i i) | ƒ o, t* | | d | | | ƒ o
 d	 } n n q_ W| Sd S(   s  Byte-compile all modules in the given directory tree.

    Arguments (only dir is required):

    dir:       the directory to byte-compile
    maxlevels: maximum recursion level (default 10)
    ddir:      if given, purported directory name (this is the
               directory name that will show up in error messages)
    force:     if 1, force compilation, even if timestamps are up-to-date

    s   Listings   ...s
   Can't listi   iýÿÿÿs   .pys   cs   oi    s	   Compilings    s   Sorry:s   :N(+   s   dirs   oss   listdirs   namess   errors   sorts   successs   names   paths   joins   fullnames   ddirs   dfiles   Nones   rxs   searchs   mos   isfiles   heads   tails	   __debug__s   cfiles   stats   ST_MTIMEs   ftimes   ctimes   forces
   py_compiles   compiles   oks   KeyboardInterrupts   types   syss   exc_types   exc_type_names   __name__s	   exc_values	   maxlevelss   curdirs   pardirs   isdirs   islinks   compile_dir(   s   dirs	   maxlevelss   ddirs   forces   rxs   cfiles   exc_type_names   namess   ctimes   oks   names   successs   mos   tails   ftimes   fullnames   dfiles   head(    (    s    /usr/lib/python2.2/compileall.pys   compile_dir s`     	
    

Ti   c    sf   d } xU t i D]J } | p | t i j o |  o	 d GHn | o t | | t	 | ƒ } q W| Sd S(   sç   Byte-compile all module on sys.path.

    Arguments (all optional):

    skip_curdir: if true, skip current directory (default true)
    maxlevels:   max recursion level (default 0)
    force: as for compile_dir() (default 0)

    i   s   Skipping current directoryN(   s   successs   syss   paths   dirs   oss   curdirs   skip_curdirs   compile_dirs	   maxlevelss   Nones   force(   s   skip_curdirs	   maxlevelss   forces   successs   dir(    (    s    /usr/lib/python2.2/compileall.pys   compile_pathT s    	 
 	 c     sÉ  d k  } y# | i  t i d d ƒ \ } } WnM | i j
 o> }
 |
 GHd GHd GHd GHd GHd GHd	 GHd
 GHt i d ƒ n Xd } t	 } d } t	 } x‚ | D]z \ } }  | d j o
 d } n | d j o
 |  } n | d j o
 d } n | d j o d k } | i |  ƒ } n q› W| o- t | ƒ d j o d GHt i d ƒ n n d } yM | o9 x2 | D]* }	 t |	 | | | | ƒ o
 d } n qdWn
 t ƒ  } Wn t j
 o d GHd } n X| Sd S(   s   Script main program.Ni   s   lfd:x:sN   usage: python compileall.py [-l] [-f] [-d destdir] [-s regexp] [directory ...]s   -l: don't recurse downs3   -f: force rebuild even if timestamps are up-to-dates7   -d destdir: purported directory name for error messagess4      if no directory arguments, -l sys.path is assumeds<   -x regexp: skip files matching the regular expression regexps8      the regexp is search for in the full path of the filei   i
   i    s   -ls   -ds   -fs   -xs1   -d destdir require exactly one directory arguments   
[interrupt](   s   getopts   syss   argvs   optss   argss   errors   msgs   exits	   maxlevelss   Nones   ddirs   forces   rxs   os   as   res   compiles   lens   successs   dirs   compile_dirs   compile_paths   KeyboardInterrupt(   s   as   forces   ddirs	   maxlevelss   argss   rxs   successs   os   res   dirs   msgs   getopts   opts(    (    s    /usr/lib/python2.2/compileall.pys   mainf sZ     	#  
 
 
	 s   __main__(   s   __doc__s   oss   stats   syss
   py_compiles   __all__s   Nones   compile_dirs   compile_paths   mains   __name__s   exit_statuss   exit(	   s   stats   __all__s   exit_statuss
   py_compiles   compile_paths   syss   oss   mains   compile_dir(    (    s    /usr/lib/python2.2/compileall.pys   ? s   				>	,
