��
���Lc @s�dZddkZddkZddkZddgZdddddd�Zddddd �Zd
�Ze djo!e
e��Zeie�ndS(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.
i����Ntcompile_dirtcompile_pathi
icCs�|pdG|GdGHnyti|�}Wn%tij
odG|GHg}nX|i�d}x~|D]v}tii||�} |dj otii||�}
nd}
|dj o!|i| �}|oqjq�ntii| �ol|d |d}}
|
djoF| t odpd}ti
| �i}yti
|�i}Wntij
o
d }nX||jo|oqjn|pd
G| GdGHnyti
| d|
t�}Wnytj
o
t�qZtij
o/}|od
G| GdGHn|iGHd }qZtj
o}dG|GHd }qZX|d jo
d }qZq�qj|d jou|tijoe|tijoUtii| �oBtii| �o.t| |d|
|||�p
d }q�qjqjW|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
quiet: if 1, be quiet during compilation
tListings...s
Can't listii����s.pytctoit CompilingtSorryN(tostlistdirterrortsorttpathtjointNonetsearchtisfilet __debug__tstattst_mtimet
py_compiletcompiletTruetKeyboardInterrupttPyCompileErrortmsgtIOErrortcurdirtpardirtisdirtislinkR(tdirt maxlevelstddirtforcetrxtquiettnamestsuccesstnametfullnametdfiletmotheadttailtcfiletftimetctimetokterrte((s /usr/lib/python2.6/compileall.pyRsj
icCshd}x[tiD]P}|p|tijo|o dGHq|ot||d|d|�}qW|S(sByte-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)
quiet: as for compile_dir() (default 0)
isSkipping current directoryR#N(tsysRRRRR
(tskip_curdirRR!R#R%R((s /usr/lib/python2.6/compileall.pyRWs
cCs�ddk}y#|itidd�\}}WnR|ij
oC}|GHdGHdGHdGHdGHd GHd
GHdGHdGHtid
�nXd}d}d}d}d}x�|D]�\} }
| djo
d}n| djo
|
}n| djo
d}n| djo
d}n| djoddk}|i|
�}q�q�W|o-t|�djodGHtid
�qund}yO|o;xA|D],}
t |
|||||�p
d}q�q�Wn
t
�}Wntj
odGHd}nX|S(sScript main program.i����Nislfqd:x:sSusage: python compileall.py [-l] [-f] [-q] [-d destdir] [-x regexp] [directory ...]s-l: don't recurse downs3-f: force rebuild even if timestamps are up-to-dates-q: quiet operations7-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 regexps: the regexp is searched for in the full path of the fileii
is-ls-ds-fs-qs-xs1-d destdir require exactly one directory arguments
[interrupt](tgetoptR2targvR texitR
treRtlenRRR(R4toptstargsRRR R!R#R"RtaR7R%R((s /usr/lib/python2.6/compileall.pytmainksb#
t__main__(
t__doc__RR2Rt__all__R
RRR<t__name__tinttexit_statusR6(((s /usr/lib/python2.6/compileall.pyt<module>
sA 0