] @sddlZddlZddlZddlZddlZddlZddlZdddgZGddde Z dddd ddZ dd dZ e d kreje dS) NcompilemainPyCompileErrorc@s+eZdZdddZddZdS)rcCs|j}|tkrIdjtj||}|jdd|}nd||f}tj||pk||||||_||_ ||_ |p||_ dS)NrzFile ""z File "%s"z Sorry: %s: %s) __name__ SyntaxErrorjoin tracebackformat_exception_onlyreplace Exception__init__ exc_type_name exc_valuefilemsg)selfexc_typerrrrtbtexterrmsgr//opt/alt/python35/lib64/python3.5/py_compile.pyr -s      zPyCompileError.__init__cCs|jS)N)r)rrrr__str__=szPyCompileError.__str__N)r __module__ __qualname__r rrrrrrs FcCs|dkr]|dkrK|dkr*|nd}tjj|d|}ntjj|}tjj|rd}t|j|n@tjj|rtjj | rd}t|j|tj j d|}|j |}y"|j ||p|d|} Wnjtk r} zJt| j| |p=|} |rR| ntjj| jd dSWYdd} ~ XnXy)tjj|} | rtj| Wntk rYnX|j|} tjj| | d | d }tjj|}tjj||||S) Nrrr optimizationzc{} is a symlink and will be changed into a regular file if import writes a byte-compiled file to itzk{} is a non-regular file and will be changed into a regular one if import writes a byte-compiled file to itz _optimize mtimesize) importlibutilcache_from_sourceospathislinkFileExistsErrorformatexistsisfile machinerySourceFileLoaderget_datasource_to_coder r __class__sysstderrwriterdirnamemakedirs path_stats_bootstrap_external_code_to_bytecode _calc_mode _write_atomic)rcfiledfiledoraiseoptimizerrloader source_bytescodeerrpy_excr3 source_statsbytecodemoderrrrAsF)   %    cCsh|dkrtjdd}d}|dgkrx-tjj}|sMP|jd}yt|ddWq7tk r}z"d}tjjd|j WYdd}~Xq7t k r}zd}tjjd|WYdd}~Xq7Xq7Wnjxg|D]_}yt|ddWqtk r_}z"d}tjjd|j WYdd}~XqXqW|S)Nrr-rr<Tz%s ) r0argvstdinreadlinerstriprrr1r2rOSError)argsrvfilenameerrorrrrrs0 ). .__main__)Zimportlib._bootstrap_externalr!Zimportlib.machineryimportlib.utilr$Zos.pathr0r __all__r rrrrexitrrrrs       0R&