<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
        integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ=="
        crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
</html>
3
2aX                 @   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j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)
build-dir=ddirectory to "build" (copy) toforcef1forcibly build everything (ignore file timestampsexecutable=e*specify final destination interpreter pathc             C   s"   d | _ d | _d | _d | _d | _d S )N)	build_dirscriptsr   
executableoutfiles)self r   2/opt/alt/python36/lib64/python3.6/build_scripts.pyinitialize_options   s
    z build_scripts.initialize_optionsc             C   s   | j dddd | jj| _d S )	NZbuildr	   r   r   r   )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 | j  d S )N)r   copy_scripts)r   r   r   r   run/   s    zbuild_scripts.runc          "   C   s  | j | j g }g }x,| jD ] }d}t|}tjj| jtjj|}|j| | j	 rtt
|| rttjd| qyt|d}W n  tk
r   | js d }Y nXX tj|j\}}|jd |j }	|	s| jd|  qtj|	}
|
rd}|
jdpd}|rtjd	|| j |j| | jstjs2| j}n(tjjtjd
dtjdtjdf }tj|}d| | d }y|jd W n$ tk
r   t dj!|Y nX y|j| W n& tk
r   t dj!||Y nX t|d}|j"| |j#|j$  W d Q R X |r@|j%  q|r*|j%  |j| | j&|| qW tj'dkrxh|D ]`}| jrptjd| nDtj(|t) d@ }|dB d@ }||krVtjd||| tj*|| qVW ||fS )NFznot copying %s (up-to-date)rbr   z%s is an empty file (skipping)T       zcopying and adjusting %s -> %sBINDIRz
python%s%sVERSION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   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_liner7   Zpost_interpr   ZshebangZoutffileZoldmodeZnewmoder   r   r   r   5   s    












zbuild_scripts.copy_scriptsN)r
   r   r   )r   r   r   )r   r   r   )__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| \}}| js| j| ||fS )N)r	   r   r0   Zrun_2to3)r   r   rG   r   r   r   r      s    
zbuild_scripts_2to3.copy_scriptsN)rK   rL   rM   r   r   r   r   r   rO      s   rO   )r(   rerE   r   Z	distutilsr   Zdistutils.corer   Zdistutils.dep_utilr   Zdistutils.utilr   r   r   r1   compiler6   r	   rO   r   r   r   r   <module>   s   
 
