Current File : //usr/lib/python3/dist-packages/setuptools/command/__pycache__/install_scripts.cpython-312.pyc
�


_�d7	��h�ddlmZddlmcmZddlZddlZddlm	Z	Gd�dej�Zy)�)�logN�)�ensure_directoryc�*�eZdZdZd�Zd�Zd�Zdd�Zy)�install_scriptsz;Do normal script install, plus any egg_info wrapper scriptsc�P�tjj|�d|_y)NF)�origr�initialize_options�no_ep��selfs �D/usr/lib/python3/dist-packages/setuptools/command/install_scripts.pyr
z"install_scripts.initialize_optionss�����/�/��5���
�c���|jd�|jjr tjj|�ng|_|jry|j�y)N�egg_info)	�run_command�distribution�scriptsr	r�run�outfilesr�_install_ep_scriptsrs rrzinstall_scripts.runsP������$����$�$�� � �$�$�T�*��D�M��:�:��� � �"rc�$�ddlm}m}ddlm}|jd�}||j||j|j�|j|j�}|jd�}t|dd�}|j}|tjk(r|g}|j�}|jj�j!|�}	|j#||	j%��D]}
|j&|
��y)Nr)�Distribution�PathMetadata�)�easy_installr�
build_scripts�
executable)�
pkg_resourcesrr�r�get_finalized_command�egg_baser�egg_name�egg_version�getattr�ScriptWriter�sysr�best�command_spec_class�
from_param�get_args�	as_header�write_script)r
rr�ei�ei_cmd�dist�bs_cmd�
exec_param�writer�cmd�argss           rrz#install_scripts._install_ep_scriptss���<�(��+�+�J�7����O�O�����&�/�/�:��O�O����	
���+�+�O�<���V�\�4�8�
���������'�%��J�������'�'�,�,�.�9�9�*�E���O�O�D�#�-�-�/�:�	%�D��D���t�$�	%rc��ddlm}m}tjd||j
�tjj|j
|�}|jj|�|�}|jsHt|�t|d|z�}	|	j|�|	j�||d|z
�yy)z1Write an executable file to the scripts directoryr)�chmod�
current_umaskzInstalling %s script to %s�wi�N)�setuptools.command.easy_installr7r8r�info�install_dir�os�path�joinr�append�dry_runr�open�write�close)
r
�script_name�contents�mode�ignoredr7r8�target�mask�fs
          rr-zinstall_scripts.write_script4s���H����-�{�D�<L�<L�M������d�.�.��<���
�
���V�$�����|�|��V�$��V�S�4�Z�(�A�
�G�G�H��
�G�G�I��&�%�$�,�'�rN)�t)�__name__�
__module__�__qualname__�__doc__r
rrr-�rrrr	s��E��	#�%�2(rr)
�	distutilsr�!distutils.command.install_scripts�commandrr	r=r'�_pathrrQrr�<module>rVs)���0�0�	�
�$�9(�d�*�*�9(r