<!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>
B
    ‘–ReŽk  ã            
   @   s:  d Z 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 ddlmZ dd	lmZmZmZ dd
lmZ ddlmZ ddlmZ ddlmZ dZddddddœZddddddœddddddœeddddddœddddddœdœZer"dddd d!dœed"< ddd#d$d!dœed%< dZG d&d'„ d'eƒZdS )(zFdistutils.command.install

Implements the Distutils 'install' command.é    N)Úlog)ÚCommand)ÚDEBUG)Úget_config_vars)ÚDistutilsPlatformError)Ú
write_file)Úconvert_pathÚ
subst_varsÚchange_root)Úget_platform)ÚDistutilsOptionError)Ú	USER_BASE)Ú	USER_SITETz$base/Lib/site-packagesz$base/Include/$dist_namez$base/Scriptsz$base)ÚpurelibÚplatlibÚheadersÚscriptsÚdataz/$base/lib/python$py_version_short/site-packagesz;$platbase/$platlibdir/python$py_version_short/site-packagesz9$base/include/python$py_version_short$abiflags/$dist_namez	$base/binz$base/lib/pythonz$base/$platlibdir/pythonz$base/include/python/$dist_namez$base/site-packagesz$base/include/$dist_name)Úunix_prefixÚ	unix_homeÚntÚpypyÚpypy_ntz	$usersitez4$userbase/Python$py_version_nodot/Include/$dist_namez)$userbase/Python$py_version_nodot/Scriptsz	$userbaseÚnt_userz=$userbase/include/python$py_version_short$abiflags/$dist_namez$userbase/binÚ	unix_userc               @   s:  e Zd ZdZdddddddd	d
dddddddddgZdddgZer`e ddde f¡ e d¡ ddiZ	dd„ Z
dd„ Zdd „ Zd!d"„ Zd#d$„ Zd%d&„ Zd'd(„ Zd)d*„ Zd+d,„ Zd-d.„ Zd/d0„ Zd1d2„ Zd3d4„ Zd5d6„ Zd7d8„ Zd9d:„ Zd;d<„ Zd=d>„ Zd?d@„ ZdAdB„ ZdCdD„ ZdEefdFefdGefdHefdIdJdK„ fgZdS )LÚinstallz'install everything from build directory)zprefix=Nzinstallation prefix)zexec-prefix=Nz.(Unix only) prefix for platform-specific files)zhome=Nz+(Unix only) home directory to install under)zinstall-base=Nz;base installation directory (instead of --prefix or --home))zinstall-platbase=Nz\base installation directory for platform-specific files (instead of --exec-prefix or --home))zroot=Nz<install everything relative to this alternate root directory)zinstall-purelib=Nz;installation directory for pure Python module distributions)zinstall-platlib=Nz8installation directory for non-pure module distributions)zinstall-lib=Nzginstallation directory for all module distributions (overrides --install-purelib and --install-platlib))zinstall-headers=Nz(installation directory for C/C++ headers)zinstall-scripts=Nz)installation directory for Python scripts)zinstall-data=Nz%installation directory for data files)ÚcompileÚczcompile .py to .pyc [default])z
no-compileNzdon't compile .py files)z	optimize=ÚOzlalso compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0])ÚforceÚfz1force installation (overwrite any existing files))z
skip-buildNz2skip rebuilding everything (for testing/debugging))zrecord=Nz3filename in which to record list of installed filesr   r   z
skip-buildÚuserNz!install in user site-package '%s'z
no-compilec             C   sš   d| _ d| _d| _d| _d| _d| _d| _d| _d| _d| _	d| _
d| _d| _t| _t| _d| _d| _d| _d| _d| _d| _d| _d| _d| _d| _dS )zInitializes options.Nr   é   )ÚprefixÚexec_prefixÚhomer!   Úinstall_baseÚinstall_platbaseÚrootÚinstall_purelibÚinstall_platlibÚinstall_headersÚinstall_libÚinstall_scriptsÚinstall_datar   Úinstall_userbaser   Úinstall_usersiter   ÚoptimizeÚ
extra_pathÚinstall_path_filer   Ú
skip_buildÚwarn_dirÚ
build_baseÚ	build_libÚrecord)Úself© r:   ú›/builddir/build/BUILDROOT/alt-python37-setuptools-58.3.0-4.el8.x86_64/opt/alt/python37/lib/python3.7/site-packages/setuptools/_distutils/command/install.pyÚinitialize_options    s2    zinstall.initialize_optionsc             C   s„  | j s| js| jr&| js| jr&tdƒ‚| jr@| j s8| jr@tdƒ‚| jrl| j sd| jsd| jsd| jsd| jrltdƒ‚tjdkrŒ| jrŒ|  	d¡ d| _|  
d¡ tjdkrª|  ¡  n|  ¡  |  
d¡ tj ¡ d	 }td
dƒ\}}y
tj}W n tk
rú   d}Y nX | j ¡ | j ¡ | j ¡ |dtjdd…  dtjdd…  |||||ttddƒdœ| _trp| j| jd< | j| jd< |  ¡  |  
d¡ | j| jd< | j| jd< tr¾d	dlm} t dƒ || jƒ |  !¡  |  
d¡ | jrà|  "¡  | j#dkr
| j $¡ r| j%| _#n| j&| _#|  'dddddddd¡ |  (¡  | j#| _)tj* +| j#| j,¡| _#| j-dk	rh|  .d dddddd¡ |  
d!¡ |  /d"d#d$¡ dS )%zFinalizes options.zWmust supply either prefix/exec-prefix/home or install-base/install-platbase -- not bothz9must supply either home or prefix/exec-prefix -- not bothzGcan't combine user with prefix, exec_prefix/home, or install_(plat)baseÚposixz+exec-prefix option ignored on this platformNzpre-finalize_{unix,other}zpost-finalize_{unix,other}()r   r#   r$   Ú z%d.%dé   z%d%dÚ
platlibdirÚlib)Ú	dist_nameÚdist_versionÚdist_fullnameÚ
py_versionÚpy_version_shortÚpy_version_nodotÚ
sys_prefixr#   Úsys_exec_prefixr$   Úabiflagsr@   ÚuserbaseÚusersitezpost-expand_basedirs()ÚbaseÚplatbase)Úpprintzconfig vars:zpost-expand_dirs()r   r   r   r   r   Úlibbasezafter prepending rootÚbuild)r6   r6   )r7   r7   )0r#   r$   r%   r&   r'   r   r!   ÚosÚnameÚwarnÚ	dump_dirsÚfinalize_unixÚfinalize_otherÚsysÚversionÚsplitr   rJ   ÚAttributeErrorÚdistributionÚget_nameÚget_versionÚget_fullnameÚversion_infoÚgetattrÚconfig_varsÚHAS_USER_SITEr/   r0   Úexpand_basedirsr   rO   ÚprintÚexpand_dirsÚcreate_home_pathr,   Úhas_ext_modulesr*   r)   Úconvert_pathsÚhandle_extra_pathÚinstall_libbaseÚpathÚjoinÚ
extra_dirsr(   Úchange_rootsÚset_undefined_options)r9   rE   r#   r$   rJ   rO   r:   r:   r;   Úfinalize_optionsî   sŠ    















zinstall.finalize_optionsc             C   s¤   t sdS ddlm} t |d ¡ x|| jD ]r}|d }|d dkrN|dd… }|| jkrz| j| }| |¡}t| |ƒ }n| |¡}t| |ƒ}t d||¡ q*W dS )zDumps the list of user options.Nr   )Úlongopt_xlateú:éÿÿÿÿú=z  %s: %s)	r   Údistutils.fancy_getoptrr   r   ÚdebugÚuser_optionsÚnegative_optÚ	translatera   )r9   Úmsgrr   ÚoptÚopt_nameÚvalr:   r:   r;   rU   „  s    




zinstall.dump_dirsc             C   s"  | j dk	s| jdk	r\| jdkr2| jdkr2| jdksP| jdksP| jdksP| jdkrXtdƒ‚dS | j	rŽ| j
dkrttdƒ‚| j
 | _ | _|  d¡ n| jdk	r²| j | _ | _|  d¡ nl| jdkrð| jdk	rÎtdƒ‚tj tj¡| _tj tj¡| _n| jdkr| j| _| j| _ | j| _|  d¡ dS )z&Finalizes options for posix platforms.NzPinstall-base or install-platbase supplied, but installation scheme is incompletez$User base directory is not specifiedr   r   z*must not supply exec-prefix without prefixr   )r&   r'   r,   r)   r*   r+   r-   r.   r   r!   r/   r   Úselect_schemer%   r#   r$   rR   rl   ÚnormpathrX   )r9   r:   r:   r;   rV   —  s<    









zinstall.finalize_unixc             C   s¼   | j r8| jdkrtdƒ‚| j | _| _|  tjd ¡ n€| jdk	r\| j | _| _|  d¡ n\| j	dkrvtj
 tj	¡| _	| j	 | _| _y|  tj¡ W n" tk
r¶   tdtj ƒ‚Y nX dS )z)Finalizes options for non-posix platformsNz$User base directory is not specifiedÚ_userr   z)I don't know how to install stuff on '%s')r!   r/   r   r&   r'   r   rR   rS   r%   r#   rl   r€   rX   ÚKeyError)r9   r:   r:   r;   rW   ¿  s"    


zinstall.finalize_otherc             C   sr   t tdƒr2tjdk r2| d¡s2tjdkr.d}nd}t| }x2tD ]*}d| }t| |ƒdkr@t	| ||| ƒ q@W dS )	z=Sets the install directories by applying the install schemes.Úpypy_version_info)é   é   )r   Ú_homer   r   r   Úinstall_N)
ÚhasattrrX   r`   ÚendswithrR   rS   ÚINSTALL_SCHEMESÚSCHEME_KEYSra   Úsetattr)r9   rS   ÚschemeÚkeyÚattrnamer:   r:   r;   r   Õ  s    




zinstall.select_schemec             C   s\   xV|D ]N}t | |ƒ}|d k	rtjdks0tjdkr<tj |¡}t|| jƒ}t| ||ƒ qW d S )Nr=   r   )ra   rR   rS   rl   Ú
expanduserr	   rb   rŒ   )r9   ÚattrsÚattrr~   r:   r:   r;   Ú_expand_attrså  s    

zinstall._expand_attrsc             C   s   |   dddg¡ dS )zNCalls `os.path.expanduser` on install_base, install_platbase and
        root.r&   r'   r(   N)r“   )r9   r:   r:   r;   rd   î  s    zinstall.expand_basedirsc             C   s   |   ddddddg¡ dS )z+Calls `os.path.expanduser` on install dirs.r)   r*   r,   r+   r-   r.   N)r“   )r9   r:   r:   r;   rf   ó  s    zinstall.expand_dirsc             G   s0   x*|D ]"}d| }t | |tt| |ƒƒƒ qW dS )z!Call `convert_path` over `names`.r‡   N)rŒ   r   ra   )r9   ÚnamesrS   r’   r:   r:   r;   ri   ù  s    
zinstall.convert_pathsc             C   s¤   | j dkr| jj | _ | j dk	rŒt d¡ t| j tƒrB| j  d¡| _ t| j ƒdkr`| j d  }}n"t| j ƒdkrz| j \}}ntdƒ‚t	|ƒ}nd}d}|| _
|| _dS )	z4Set `path_file` and `extra_dirs` using `extra_path`.NzIDistribution option extra_path is deprecated. See issue27919 for details.ú,r"   r   r?   zY'extra_path' option must be a list, tuple, or comma-separated string with 1 or 2 elementsr>   )r2   r\   r   rT   Ú
isinstanceÚstrrZ   Úlenr   r   Ú	path_filern   )r9   r™   rn   r:   r:   r;   rj   ÿ  s$    



zinstall.handle_extra_pathc          	   G   s4   x.|D ]&}d| }t | |t| jt| |ƒƒƒ qW dS )z:Change the install directories pointed by name using root.r‡   N)rŒ   r
   r(   ra   )r9   r”   rS   r’   r:   r:   r;   ro   !  s    
zinstall.change_rootsc             C   sf   | j s
dS ttj d¡ƒ}xF| j ¡ D ]8\}}| |¡r&tj |¡s&|  	d| ¡ t 
|d¡ q&W dS )zCreate directories under ~.Nú~zos.makedirs('%s', 0o700)iÀ  )r!   r   rR   rl   r   rb   ÚitemsÚ
startswithÚisdirÚdebug_printÚmakedirs)r9   r%   rS   rl   r:   r:   r;   rg   '  s    zinstall.create_home_pathc             C   s*  | j s6|  d¡ | j d¡j}| jr6|tƒ kr6tdƒ‚x|  ¡ D ]}|  |¡ q@W | j	r`|  
¡  | jrÂ|  ¡ }| jr¨t| jƒ}x(tt|ƒƒD ]}|| |d… ||< qŒW |  t| j|fd| j ¡ ttjjtjƒ}ttjj|ƒ}tj tj | j¡¡}| jr&| j	r| js&||kr&t d| j¡ dS )zRuns the command.rQ   z"Can't install when cross-compilingNz'writing list of installed files to '%s'zƒmodules installed to '%s', which is not in Python's module search path (sys.path) -- you'll have to change the search path yourself)r4   Úrun_commandr\   Úget_command_objÚ	plat_namer5   r   r   Úget_sub_commandsr™   Úcreate_path_filer8   Úget_outputsr(   r˜   ÚrangeÚexecuter   ÚmaprR   rl   r€   rX   Únormcaser,   r3   r   rw   )r9   Ú
build_platÚcmd_nameÚoutputsÚroot_lenÚcounterÚsys_pathr,   r:   r:   r;   Úrun3  s6    



zinstall.runc             C   sJ   t j | j| jd ¡}| jr8|  t|| jgfd| ¡ n|  	d| ¡ dS )zCreates the .pth filez.pthzcreating %szpath file '%s' not createdN)
rR   rl   rm   rk   r™   r3   r§   r   rn   rT   )r9   Úfilenamer:   r:   r;   r¤   _  s    

zinstall.create_path_filec             C   sp   g }x>|   ¡ D ]2}|  |¡}x"| ¡ D ]}||kr&| |¡ q&W qW | jrl| jrl| tj | j	| jd ¡¡ |S )z.Assembles the outputs of all the sub-commands.z.pth)
r£   Úget_finalized_commandr¥   Úappendr™   r3   rR   rl   rm   rk   )r9   r¬   r«   Úcmdr±   r:   r:   r;   r¥   m  s    
zinstall.get_outputsc             C   s2   g }x(|   ¡ D ]}|  |¡}| | ¡ ¡ qW |S )z*Returns the inputs of all the sub-commands)r£   r²   ÚextendÚ
get_inputs)r9   Úinputsr«   r´   r:   r:   r;   r¶   ~  s
    
zinstall.get_inputsc             C   s   | j  ¡ p| j  ¡ S )zSReturns true if the current distribution has any Python
        modules to install.)r\   Úhas_pure_modulesrh   )r9   r:   r:   r;   Úhas_libŠ  s    
zinstall.has_libc             C   s
   | j  ¡ S )zLReturns true if the current distribution has any headers to
        install.)r\   Úhas_headers)r9   r:   r:   r;   rº     s    zinstall.has_headersc             C   s
   | j  ¡ S )zMReturns true if the current distribution has any scripts to.
        install.)r\   Úhas_scripts)r9   r:   r:   r;   r»   •  s    zinstall.has_scriptsc             C   s
   | j  ¡ S )zJReturns true if the current distribution has any data to.
        install.)r\   Úhas_data_files)r9   r:   r:   r;   Úhas_dataš  s    zinstall.has_datar,   r+   r-   r.   Úinstall_egg_infoc             C   s   dS )NTr:   )r9   r:   r:   r;   Ú<lambda>¥  ó    zinstall.<lambda>) Ú__name__Ú
__module__Ú__qualname__Údescriptionrx   Úboolean_optionsrc   r³   r   ry   r<   rq   rU   rV   rW   r   r“   rd   rf   ri   rj   ro   rg   r°   r¤   r¥   r¶   r¹   rº   r»   r½   Úsub_commandsr:   r:   r:   r;   r   W   sh   	

N (	",r   )Ú__doc__rX   rR   Ú	distutilsr   Údistutils.corer   Údistutils.debugr   Údistutils.sysconfigr   Údistutils.errorsr   Údistutils.file_utilr   Údistutils.utilr   r	   r
   r   r   Úsiter   r   rc   ÚWINDOWS_SCHEMErŠ   r‹   r   r:   r:   r:   r;   Ú<module>   sj   