Your IP : 3.137.159.163


Current Path : /opt/alt/python33/lib64/python3.3/distutils/command/__pycache__/
Upload File :
Current File : //opt/alt/python33/lib64/python3.3/distutils/command/__pycache__/build_scripts.cpython-33.pyo

�
��fWc@s�dZddlZddlZddlmZddlmZddlmZddl	m
Z
ddlmZm
Z
ddlmZddlZejd	�ZGd
d�de�ZGdd
�d
ee
�ZdS(uRdistutils.command.build_scripts

Implements the Distutils 'build_scripts' command.iN(uST_MODE(u	sysconfig(uCommand(unewer(uconvert_pathu	Mixin2to3(ulogs^#!.*python[0-9.]*([ 	].*)?$cBsn|EeZdZdZdddgZdgZdd�Zd
d�Zdd�Zdd�Z	dd�Z
dS(u
build_scriptsu("build" scripts (copy and fixup #! line)u
build-dir=ududirectory to "build" (copy) touforceufu1forcibly build everything (ignore file timestampsuexecutable=ueu*specify final destination interpreter pathcCs1d|_d|_d|_d|_d|_dS(N(uNoneu	build_diruscriptsuforceu
executableuoutfiles(uself((uD/opt/alt/python33/lib64/python3.3/distutils/command/build_scripts.pyuinitialize_optionss
				u build_scripts.initialize_optionscCs)|jdddd�|jj|_dS(	Nubuildu
build_scriptsu	build_diruforceu
executable(u
build_scriptsu	build_dir(uforceuforce(u
executableu
executable(uset_undefined_optionsudistributionuscripts(uself((uD/opt/alt/python33/lib64/python3.3/distutils/command/build_scripts.pyufinalize_options%s
	ubuild_scripts.finalize_optionscCs|jS(N(uscripts(uself((uD/opt/alt/python33/lib64/python3.3/distutils/command/build_scripts.pyuget_source_files,subuild_scripts.get_source_filescCs|js
dS|j�dS(N(uscriptsucopy_scripts(uself((uD/opt/alt/python33/lib64/python3.3/distutils/command/build_scripts.pyurun/s	ubuild_scripts.runc$Cs�|j|j�g}g}x�|jD]�}d}t|�}tjj|jtjj|��}|j	|�|j
r�t||�r�tj
d|�q&nyt|d�}Wn'tk
r�|js��nd}Yn�Xtj|j�\}}|jd�|j�}	|	s*|jd|�q&ntj|	�}
|
r]d}|
jd�pWd}n|r�tjd||j�|j	|�|js�tjs�|j}n:tjjtjd�d	tjd
�tjd�f�}tj |�}d||d
}
y|
j!d�Wn't"k
r9t#dj$|
���YnXy|
j!|�Wn*t"k
rwt#dj$|
|���YnXt|d��'}|j%|
�|j&|j'��WdQXn|r�|j(�q�q&|r�|j(�n|j	|�|j)||�q&Wtj*dkr�x�|D]|}|jr5tjd|�qtj+|�t,d@}|dBd@}||krtjd|||�tj-||�qqWn||fS(u"Copy each script listed in 'self.scripts'; if it's marked as a
        Python script in the Unix way (first line matches 'first_line_re',
        ie. starts with "\#!" and contains "python"), then adjust the first
        line to refer to the current Python interpreter as we copy.
        unot copying %s (up-to-date)urbiu%s is an empty file (skipping)isucopying and adjusting %s -> %suBINDIRu
python%s%suVERSIONuEXEs#!s
uutf-8u.The shebang ({!r}) is not decodable from utf-8uAThe shebang ({!r}) is not decodable from the script encoding ({})uwbNuposixuchanging mode of %si�imu!changing mode of %s from %o to %oFT(.umkpathu	build_diruscriptsuFalseuconvert_pathuosupathujoinubasenameuappenduforceunewerulogudebuguopenuIOErrorudry_runuNoneutokenizeudetect_encodingureadlineuseekuwarnu
first_line_reumatchuTrueugroupuinfou	sysconfigupython_buildu
executableuget_config_varufsencodeudecodeuUnicodeDecodeErroru
ValueErroruformatuwriteu
writelinesu	readlinesucloseu	copy_fileunameustatuST_MODEuchmod(uselfuoutfilesu
updated_filesuscriptuadjustuoutfileufuencodingulinesu
first_lineumatchupost_interpu
executableushebanguoutfufileuoldmodeunewmode((uD/opt/alt/python33/lib64/python3.3/distutils/command/build_scripts.pyucopy_scripts5s�$

	


			





		
ubuild_scripts.copy_scriptsN(u
build-dir=ududirectory to "build" (copy) to(uforceufu1forcibly build everything (ignore file timestamps(uexecutable=ueu*specify final destination interpreter path(u__name__u
__module__u__qualname__udescriptionuuser_optionsuboolean_optionsuinitialize_optionsufinalize_optionsuget_source_filesurunucopy_scripts(u
__locals__((uD/opt/alt/python33/lib64/python3.3/distutils/command/build_scripts.pyu
build_scriptss		u
build_scriptscBs |EeZdZdd�ZdS(ubuild_scripts_2to3cCs8tj|�\}}|js.|j|�n||fS(N(u
build_scriptsucopy_scriptsudry_runurun_2to3(uselfuoutfilesu
updated_files((uD/opt/alt/python33/lib64/python3.3/distutils/command/build_scripts.pyucopy_scripts�s	ubuild_scripts_2to3.copy_scriptsN(u__name__u
__module__u__qualname__ucopy_scripts(u
__locals__((uD/opt/alt/python33/lib64/python3.3/distutils/command/build_scripts.pyubuild_scripts_2to3�subuild_scripts_2to3(u__doc__uosureustatuST_MODEu	distutilsu	sysconfigudistutils.coreuCommandudistutils.dep_utilunewerudistutils.utiluconvert_pathu	Mixin2to3ulogutokenizeucompileu
first_line_reu
build_scriptsubuild_scripts_2to3(((uD/opt/alt/python33/lib64/python3.3/distutils/command/build_scripts.pyu<module>s�

?>