o
Xai!
ã @ sd d dl mZ d dlm mZ d dlmZ d dlZd dl Z d dl
mZmZm
Z
G dd„ dejƒZdS )é )ÚlogN)ÚDistutilsModuleError)ÚDistributionÚPathMetadataÚensure_directoryc @ s* e Zd ZdZdd„ Zdd„ Zd
dd„Zd S )Úinstall_scriptsz;Do normal script install, plus any egg_info wrapper scriptsc C s t j | ¡ d| _d S )NF)Úorigr Úinitialize_optionsÚno_ep)Úself© r ú›/builddir/build/BUILDROOT/alt-python310-setuptools-58.3.0-4.el8.x86_64/opt/alt/python310/lib/python3.10/site-packages/setuptools/command/install_scripts.pyr
s
z"install_scripts.initialize_optionsc C s dd l m m} | d¡ | jjrtj | ¡ ng | _ | j
r!d S | d¡}t|j
t|j
|jƒ|j|jƒ}| d¡}t|dd ƒ}z
| d¡}t|ddƒ}W n
ttfyZ d}Y nw |j}|red}|j}|tjkrm|g}| ¡ }|j ¡ |¡} | || ¡ ¡D ]}
| j|
Ž qd S ) Nr Úegg_infoÚ
build_scriptsÚ
executableZ
bdist_wininstZ_is_runningFz
python.exe)Úsetuptools.command.easy_installÚcommandÚeasy_installÚrun_commandÚdistributionÚscriptsr r ÚrunÚoutfilesr
Úget_finalized_commandr Zegg_baser r Úegg_nameZegg_versionÚgetattrÚImportErrorr ZScriptWriterZWindowsScriptWriterÚsysr ÚbestZcommand_spec_classÚ
from_paramÚget_argsZ as_headerÚwrite_script)r ÚeiZei_cmdÚdistZbs_cmdZ
exec_paramZbw_cmdZ
is_wininstÚwriterÚcmdÚargsr r r
r s>
þ
ÿ
ÿzinstall_scripts.runÚtc
G s† ddl m}m} t d|| j¡ tj | j|¡}| j
|¡ |ƒ }| jsAt|ƒ t
|d| ƒ} | |¡ | ¡ ||d| ƒ dS dS )z1Write an executable file to the scripts directoryr )ÚchmodÚ
current_umaskzInstalling %s script to %sÚwiÿ N)r r( r) r ÚinfoZinstall_dirÚosÚpathÚjoinr ÚappendÚdry_runr ÚopenÚwriteÚclose)
r Úscript_nameÚcontentsÚmodeZignoredr( r) ÚtargetÚmaskÚfr r r
r! 7 s
ûzinstall_scripts.write_scriptN)r' )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r r r! r r r r
r
s
&r )Ú distutilsr Z!distutils.command.install_scriptsr r r Údistutils.errorsr r, r Ú
pkg_resourcesr r r r r r r
Ú