£Á°èZ¨Ä…–K§‚«“ô4“ÒÙ´dîfUÙÃÅ WKbyÊ¦•êŽ…È®FÒ¿ÊÎóCozá¬S@6{Í:›œêZÌ:Š•_%:¢¾¾~;‘Ã~èŠ©ÊÇí`ÔÑ©úë™µ'5I¿fš×WO%ø9¾«¾DK|€ùÍD”Ýs]nHÕ¶ê×Ó¼ãžªéUWŸÈË%DÒÕ¬ï‘]/Åcx  ‰ï2ß]ä6G[]S£ÔÏ¯rs{úëóµmÒï#UQxo·õÞCe]"±/aÙ&Eã4ú9Jé_ÞåëdãöKë)AÞ                  ¯¹ægƒÛowÐø^d™ý½ßB7áyMä9ÜÖUã
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
<html>
B
    YI~dX                 @   s   d dl Z d dlZd dlmZ d dlmZ d dlmZ d dlm	Z	 d dl
mZmZ d dlmZ d dlZedZG d	d
 d
eZG dd deeZdS )    N)ST_MODE)	sysconfig)Command)newer)convert_path	Mixin2to3)logs   ^#!.*python[0-9.]*([ 	].*)?$c               @   sH   e Zd ZdZdddgZdgZdd Zdd	 Zd
d Zdd Z	dd Z
dS )build_scriptsz("build" scripts (copy and fixup #! line))z
build-dir=dzdirectory to "build" (copy) to)forcefz1forcibly build everything (ignore file timestamps)zexecutable=ez*specify final destination interpreter pathr   c             C   s"   d | _ d | _d | _d | _d | _d S )N)	build_dirscriptsr   
executableoutfiles)self r   D/opt/alt/python37/lib64/python3.7/distutils/command/build_scripts.pyinitialize_options   s
    z build_scripts.initialize_optionsc             C   s   |  dddd | jj| _d S )NZbuild)r	   r   )r   r   )r   r   )Zset_undefined_optionsZdistributionr   )r   r   r   r   finalize_options%   s
    zbuild_scripts.finalize_optionsc             C   s   | j S )N)r   )r   r   r   r   get_source_files,   s    zbuild_scripts.get_source_filesc             C   s   | j s
d S |   d S )N)r   copy_scripts)r   r   r   r   run/   s    zbuild_scripts.runc          
   C   s  |  | j g }g }x(| jD ]}d}t|}tj| jtj|}|| | j	spt
||sptd| qyt|d}W n  tk
r   | js d }Y nXX t|j\}}|d | }	|	s| d|  qt|	}
|
rd}|
dpd}|rtd	|| j || | jstjs.| j}n(tjtd
dtdtdf }t|}d| | d }y|d W n$ tk
r   t d!|Y nX y|| W n& tk
r   t d!||Y nX t|d}|"| |#|$  W d Q R X |r<|%  q|r&|%  || | &|| qW tj'dkrxh|D ]`}| jrltd| nDt(|t) d@ }|dB d@ }||krRtd||| t*|| qRW ||fS )NFznot copying %s (up-to-date)rbr   z%s is an empty file (skipping)T       zcopying and adjusting %s -> %sZBINDIRz
python%s%sZVERSIONZEXEs   #!   
zutf-8z.The shebang ({!r}) is not decodable from utf-8zAThe shebang ({!r}) is not decodable from the script encoding ({})wbposixzchanging mode of %si  im  z!changing mode of %s from %o to %o)+Zmkpathr   r   r   ospathjoinbasenameappendr   r   r   debugopenOSErrordry_runtokenizedetect_encodingreadlineseekwarnfirst_line_rematchgroupinfor   Zpython_buildr   Zget_config_varfsencodedecodeUnicodeDecodeError
ValueErrorformatwrite
writelines	readlinescloseZ	copy_filenamestatr   chmod)r   r   updated_filesZscriptZadjustZoutfiler   encodinglinesZ
first_liner/   Zpost_interpr   ZshebangZoutffileZoldmodeZnewmoder   r   r   r   5   s    












zbuild_scripts.copy_scriptsN)__name__
__module____qualname__descriptionZuser_optionsZboolean_optionsr   r   r   r   r   r   r   r   r   r	      s   r	   c               @   s   e Zd Zdd ZdS )build_scripts_2to3c             C   s&   t | \}}| js| | ||fS )N)r	   r   r(   Zrun_2to3)r   r   r>   r   r   r   r      s    
zbuild_scripts_2to3.copy_scriptsN)rB   rC   rD   r   r   r   r   r   rF      s   rF   )r    rer<   r   Z	distutilsr   Zdistutils.corer   Zdistutils.dep_utilr   Zdistutils.utilr   r   r   r)   compiler.   r	   rF   r   r   r   r   <module>   s   
 
