-í
ç¶<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 T d d d d „ Z f 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    sZ   ! " d G|  Gd GH# y $ t i |  ƒ } Wn. % t i j
 o & d G|  GH' g  } n X( | i ƒ  ) d } * xÓ| D* ]È}
 + t i i	 |  |
 ƒ } , | o - t i i	 | |
 ƒ } n
 / t } 0 | o* 1 | i | ƒ } 2 | o
 3 q€ n n 4 t i i | ƒ o¨5 |
 d  |
 d f \ } } 6 | d j ow7 | t o d p d } 8 t i | ƒ t i } 9 y 9 t i | ƒ t i } Wn" : t i j
 o : d	 } n X; | | j o | o
 ; q€ n < d
 G| Gd GH= y > t i | t | ƒ }	 Wn‰ ? t j
 o @ t ‚ n‰ A C t t  i! ƒ t d ƒ j o D t  i! } n E t  i! i# } F d G| d GG t  i$ GHH d	 } n XJ |	 d	 j o K d	 } n n nŠ L | d	 j oD |
 t i& j o4 |
 t i' j o$ t i i( | ƒ o t i i) | ƒ o2 P t* | | d | | | ƒ o Q d	 } n n q€ WR | 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`   	
 	
	

   
W!i   c    s   T ] ^ d } _ xa t i D_ ]S } ` | p | t i j o |  o a d GHn  c | o t | | t	 | ƒ } q Wd | 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     sS  f g h d k  } i y& j | i  t i d d ƒ \ } } Wnk k | i j
 oY }
 l |
 GHm d GHo d GHp d GHq d GHr d GHs d	 GHt d
 GHu t i d ƒ n Xv d } w t	 } x d } y t	 } z 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 | o6 ‚ t | ƒ d j o ƒ d GH„ t i d ƒ n n … d } † y_ ‡ | oE ˆ x; | Dˆ ]0 }	 ‰ t |	 | | | | ƒ o Š d } n qÖWn Œ t ƒ  } Wn'  t j
 o Ž d GH d } 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   >,