OwlCyberSecurity - MANAGER
Edit File: build_scripts.cpython-39.opt-1.pyc
a ����?�gX����������������������@���s����d�Z�ddlZddlZddlmZ�ddlmZ�ddlmZ�ddl m Z �ddlmZm Z �ddlmZ�ddlZe�d �ZG�d d��de�ZG�dd ��d ee �ZdS�)zRdistutils.command.build_scripts Implements the Distutils 'build_scripts' command.�����N)�ST_MODE)� sysconfig)�Command)�newer)�convert_path� Mixin2to3)�logs���^#!.*python[0-9.]*([ ].*)?$c�������������������@���sF���e�Zd�ZdZg�d�ZdgZdd��Zdd��Zdd ��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 pathr���c�����������������C���s"���d�|�_�d�|�_d�|�_d�|�_d�|�_d�S��N)� build_dir�scriptsr���� executable�outfiles��self��r����D/opt/alt/python39/lib64/python3.9/distutils/command/build_scripts.py�initialize_options���s ����z build_scripts.initialize_optionsc�����������������C���s���|���dddd��|�jj|�_d�S�)NZbuild)r ���r���)r���r���)r���r���)Zset_undefined_optionsZdistributionr���r���r���r���r����finalize_options%���s�����zbuild_scripts.finalize_optionsc�����������������C���s���|�j�S�r���)r���r���r���r���r����get_source_files,���s����zbuild_scripts.get_source_filesc�����������������C���s���|�j�s d�S�|�����d�S�r���)r����copy_scriptsr���r���r���r����run/���s����zbuild_scripts.runc�������������� ���C���s���|���|�j��g�}g�}|�jD��],}d}t|�}tj�|�jtj�|��}|�|��|�j slt ||�slt�d|��qzt |d�}W�n�ty����|�js���d}Y�nX0�t�|j�\}}|�d��|���} | s�|��d|���qt�| �} | r�d}| �d�p�d }|�r$t�d ||�j��|�|��|�j�stj�s(|�j}n(tj�t�d�dt�d �t�d�f��}t�|�}d|�|�d�} z| �d��W�n"�t�y����t d�!| ���Y�n0�z| �|��W�n$�t�y����t d�!| |���Y�n0�t |d��(}|�"| ��|�#|�$����W�d����n1��s 0����Y��|�rH|�%���q|�r2|�%���|�|��|��&||��qtj'dk�r�|D�]`}|�j�rtt�d|��nDt�(|�t)�d@�}|dB�d@�}||k�rZt�d|||��t�*||���qZ||fS�)a"��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. Fznot copying %s (up-to-date)�rbNr���z%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���im��z!changing mode of %s from %o to %o)+Zmkpathr���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���Zpython_buildr���Zget_config_var�fsencode�decode�UnicodeDecodeError� ValueError�format�write� writelines� readlines�closeZ copy_file�name�statr����chmod)r���r���� updated_filesZscriptZadjustZoutfiler����encoding�linesZ first_liner1���Zpost_interpr���ZshebangZoutf�fileZoldmodeZnewmoder���r���r���r���5���s����� � �� �� �� . �zbuild_scripts.copy_scriptsN)�__name__� __module__�__qualname__ZdescriptionZuser_optionsZboolean_optionsr���r���r���r���r���r���r���r���r���r ������s���r ���c�������������������@���s���e�Zd�Zdd��ZdS�)�build_scripts_2to3c�����������������C���s&���t��|��\}}|�js|��|��||fS�r���)r ���r���r*���Zrun_2to3)r���r���r@���r���r���r���r�������s���� zbuild_scripts_2to3.copy_scriptsN)rD���rE���rF���r���r���r���r���r���rG�������s���rG���)�__doc__r"����rer>���r���Z distutilsr���Zdistutils.corer���Zdistutils.dep_utilr���Zdistutils.utilr���r���r���r+����compiler0���r ���rG���r���r���r���r����<module>���s��� �