Hacked By AnonymousFox

Current Path : /opt/alt/python37/lib64/python3.7/distutils/command/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib64/python3.7/distutils/command/__pycache__/build_scripts.cpython-37.opt-2.pyc

B

YI~dX�@s�ddlZddlZddlmZddlmZddlmZddlm	Z	ddl
mZmZddlm
Z
ddlZe�d�ZGd	d
�d
e�ZGdd�dee�ZdS)
�N)�ST_MODE)�	sysconfig)�Command)�newer)�convert_path�	Mixin2to3)�logs^#!.*python[0-9.]*([ 	].*)?$c@sHeZdZdZdddgZdgZdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dS)�
build_scriptsz("build" scripts (copy and fixup #! line))z
build-dir=�dzdirectory to "build" (copy) to)�force�fz1forcibly build everything (ignore file timestamps)zexecutable=�ez*specify final destination interpreter pathrcCs"d|_d|_d|_d|_d|_dS)N)�	build_dir�scriptsr�
executable�outfiles)�self�r�D/opt/alt/python37/lib64/python3.7/distutils/command/build_scripts.py�initialize_optionss
z build_scripts.initialize_optionscCs|�dddd�|jj|_dS)NZbuild)r	r)rr)rr)Zset_undefined_optionsZdistributionr)rrrr�finalize_options%s
zbuild_scripts.finalize_optionscCs|jS)N)r)rrrr�get_source_files,szbuild_scripts.get_source_filescCs|js
dS|��dS)N)r�copy_scripts)rrrr�run/szbuild_scripts.runc
Cs�|�|j�g}g}�x(|jD�]}d}t|�}tj�|jtj�|��}|�|�|j	spt
||�spt�d|�qyt
|d�}Wn tk
r�|js��d}YnXXt�|j�\}}|�d�|��}	|	s�|�d|�qt�|	�}
|
r�d}|
�d�p�d}|�rt�d	||j�|�|�|j�stj�s.|j}n(tj�t�d
�dt�d�t�d
�f�}t�|�}d||d}
y|
�d�Wn$tk
�r�t d�!|
���YnXy|
�|�Wn&tk
�r�t d�!|
|���YnXt
|d��}|�"|
�|�#|�$��WdQRX|�r<|�%�q|�r&|�%�|�|�|�&||�qWtj'dk�r�xh|D]`}|j�rlt�d|�nDt�(|�t)d@}|dBd@}||k�rRt�d|||�t�*||��qRW||fS)NFznot copying %s (up-to-date)�rbrz%s is an empty file (skipping)T��zcopying and adjusting %s -> %sZBINDIRz
python%s%sZVERSIONZEXEs#!�
zutf-8z.The shebang ({!r}) is not decodable from utf-8zAThe shebang ({!r}) is not decodable from the script encoding ({})�wb�posixzchanging mode of %si�imz!changing mode of %s from %o to %o)+Zmkpathrrr�os�path�join�basename�appendrrr�debug�open�OSError�dry_run�tokenize�detect_encoding�readline�seek�warn�
first_line_re�match�group�inforZpython_buildrZget_config_var�fsencode�decode�UnicodeDecodeError�
ValueError�format�write�
writelines�	readlines�closeZ	copy_file�name�statr�chmod)rr�
updated_filesZscriptZadjustZoutfiler�encoding�linesZ
first_liner/Zpost_interprZshebangZoutf�fileZoldmodeZnewmoderrrr5s�












zbuild_scripts.copy_scriptsN)�__name__�
__module__�__qualname__�descriptionZuser_optionsZboolean_optionsrrrrrrrrrr	sr	c@seZdZdd�ZdS)�build_scripts_2to3cCs&t�|�\}}|js|�|�||fS)N)r	rr(Zrun_2to3)rrr>rrrr�s
zbuild_scripts_2to3.copy_scriptsN)rBrCrDrrrrrrF�srF)r �rer<rZ	distutilsrZdistutils.corerZdistutils.dep_utilrZdistutils.utilrrrr)�compiler.r	rFrrrr�<module>s


Hacked By AnonymousFox1.0, Coded By AnonymousFox