AlkantarClanX12

Your IP : 3.128.171.192


Current Path : /opt/alt/python310/lib64/python3.10/distutils/command/__pycache__/
Upload File :
Current File : //opt/alt/python310/lib64/python3.10/distutils/command/__pycache__/install.cpython-310.opt-2.pyc

o

6��fRn�@s�	ddlZddlZddlZddlZddlmZddlmZddlm	Z	ddl
mZddlm
Z
ddlmZddlmZmZmZdd	lmZdd
lmZddlmZddlmZeduZd
Ziiid�ZeD]"ZdD]\ZZeZej eZ!edkr~ee!vr~dZe!eeee<qiqeeD]=Z"ee"�#�D]4\ZZ$e�%dde$�Z$e$�&dd�Z$e$�&dd�Z$edkr�e$d7Z$ej'dkr�edkr�e$�&dd�Z$e$ee"e<q�q�er�ddddd d
�ed!<ddd"d#d d
�ed$<Gd%d&�d&e�Z(dS)'�N)�log)�Command)�DEBUG)�get_config_vars)�DistutilsPlatformError)�
write_file)�convert_path�
subst_vars�change_root)�get_platform)�DistutilsOptionError)�	USER_BASE)�	USER_SITE)�purelib�platlib�headers�scripts�data)�unix_prefix�	unix_home�nt))rZposix_prefix)rZ
posix_home)rrrZincludez	\{(.+?)\}z$\g<1>z$installed_basez$basez$py_version_nodot_platz$py_version_nodotz/$dist_name)��	rz/lib/z
/$platlibdir/z	$usersitez4$userbase/Python$py_version_nodot/Include/$dist_namez)$userbase/Python$py_version_nodot/Scriptsz	$userbaseZnt_userz=$userbase/include/python$py_version_short$abiflags/$dist_namez
$userbase/bin�	unix_userc@seZdZdZgd�Zgd�Zere�dddef�e�d�ddiZ	d	d
�Z
dd�Zd
d�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd �Zd!d"�Zd#d$�Zd%d&�Zd'd(�Zd)d*�Zd+d,�Zd-d.�Zd/d0�Zd1d2�Zd3efd4efd5efd6efd7d8d9�fgZdS):�installz'install everything from build directory))zprefix=Nzinstallation prefix)zexec-prefix=Nz.(Unix only) prefix for platform-specific files)zhome=Nz+(Unix only) home directory to install under)z
install-base=Nz;base installation directory (instead of --prefix or --home))zinstall-platbase=Nz\base installation directory for platform-specific files (instead of --exec-prefix or --home))zroot=Nz<install everything relative to this alternate root directory)zinstall-purelib=Nz;installation directory for pure Python module distributions)zinstall-platlib=Nz8installation directory for non-pure module distributions)zinstall-lib=Nzginstallation directory for all module distributions (overrides --install-purelib and --install-platlib))zinstall-headers=Nz(installation directory for C/C++ headers)zinstall-scripts=Nz)installation directory for Python scripts)z
install-data=Nz%installation directory for data files)�compile�czcompile .py to .pyc [default])�
no-compileNzdon'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))�
skip-buildNz2skip rebuilding everything (for testing/debugging))zrecord=Nz3filename in which to record list of installed files)rrr!�userNz!install in user site-package '%s'rrcCs�	d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_t
r0t|_t|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_dS)Nr�)�prefix�exec_prefix�homer"�install_base�install_platbase�root�install_purelib�install_platlib�install_headers�install_lib�install_scripts�install_data�
HAS_USER_SITEr
�install_userbaser�install_usersiter�optimize�
extra_path�install_path_filer�
skip_build�warn_dir�
build_base�	build_lib�record��self�r=�@/opt/alt/python310/lib64/python3.10/distutils/command/install.py�initialize_options�s6
zinstall.initialize_optionsc
Cs�	|js
|js
|jr|js|jrtd��|jr!|js|jr!td��|jr7|js3|js3|js3|js3|jr7td��tjdkrG|jrG|�	d�d|_|�
d�tjdkrV|��n|��|�
d�t
j��d}td	d
�\}}zt
j}Wnty}d}Ynw|j��|j��|j��|dt
jdd
�dt
jdd
�|||||t
jd�|_tr�|j|jd<|j|jd<t�d�r�t�d�|jd<|� �|�
d�|j|jd<|j|jd<t!r�ddl"m"}t#d�||j�|�$�|�
d�|jr�|�%�|j&du�r|jj'�r|j(|_&n|j)|_&|�*dddddd�t�r|�*dd�|�+�|j&|_,tj-�.|j&|j/�|_&|j0du�rA|�1d dddddd�|�
d!�|�2d"d#d$�dS)%NzWmust 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 platformzpre-finalize_{unix,other}zpost-finalize_{unix,other}()rr$r%�z%d.%d�z%d%d)Z	dist_nameZdist_versionZ
dist_fullname�
py_versionZpy_version_shortZpy_version_nodotZ
sys_prefixr$Zsys_exec_prefixr%�abiflags�
platlibdir�userbaseZusersiteTZsrcdirzpost-expand_basedirs()�baseZplatbase)�pprintzconfig vars:zpost-expand_dirs()�librrrrrZlibbasezafter prepending root�build)r8r8)r9r9)3r$r%r&r'r(rr"�os�name�warn�	dump_dirs�
finalize_unix�finalize_other�sys�version�splitrrD�AttributeError�distributionZget_nameZget_versionZget_fullname�version_inforE�config_varsr0r1r2�	sysconfigZis_python_buildZget_config_var�expand_basedirsrrH�print�expand_dirs�create_home_pathr-Zext_modulesr+r*�
convert_paths�handle_extra_path�install_libbase�path�join�
extra_dirsr)�change_rootsZset_undefined_options)r<rCr$r%rDrHr=r=r>�finalize_options�s�������







��






��
�zinstall.finalize_optionscCs�	tsdSddlm}t�|d�|jD]9}|d}|ddkr'|dd�}||jvr=|j|}|�|�}t||�}n
|�|�}t||�}t�d||�qdS)Nr)�
longopt_xlate�:����=z  %s: %s)	rZdistutils.fancy_getoptrer�debug�user_options�negative_opt�	translate�getattr)r<�msgre�optZopt_name�valr=r=r>rN�s"





�zinstall.dump_dirscCs&	|jdus|jdur/|jdur|jdur|jdus)|jdus)|jdus)|jdur-td��dS|j	rI|j
dur;td��|j
|_|_|�d�dS|j
dur\|j
|_|_|�d�dS|jdur{|jdurjtd��tj�tj�|_tj�tj�|_n	|jdur�|j|_|j|_|j|_|�d�dS)NzPinstall-base or install-platbase supplied, but installation scheme is incomplete�$User base directory is not specifiedrrz*must not supply exec-prefix without prefixr)r'r(r-r*r+r,r.r/rr"r1r�
select_schemer&r$r%rKr`�normpathrQr;r=r=r>rO�sD





�
�


�
zinstall.finalize_unixcCs�	|jr|jdur
td��|j|_|_|�tjd�dS|jdur1|j|_|_|�d�dS|j	dur>tj
�tj	�|_	|j	|_|_z	|�tj�WdSt
y\tdtj��w)NrqZ_userrz)I don't know how to install stuff on '%s')r"r1rr'r(rrrKrLr&r$r`rsrQ�KeyErrorr;r=r=r>rP�s*
�

��zinstall.finalize_othercCs>	t|}tD]}d|}t||�durt||||�qdS�NZinstall_)�INSTALL_SCHEMES�SCHEME_KEYSrm�setattr)r<rLZscheme�key�attrnamer=r=r>rr�s��zinstall.select_schemecCsX|D]'}t||�}|dur)tjdkstjdkrtj�|�}t||j�}t|||�qdS)Nr@r)rmrKrLr`�
expanduserr	rWrx)r<Zattrs�attrrpr=r=r>�
_expand_attrs�s
��zinstall._expand_attrscC�	|�gd��dS)N)r'r(r)�r}r;r=r=r>rY�szinstall.expand_basedirscCr~)N)r*r+r-r,r.r/rr;r=r=r>r[�szinstall.expand_dirscGs.	|D]}d|}t||tt||���qdSru)rxrrm�r<�namesrLr|r=r=r>r]�s
�zinstall.convert_pathscCs�	|jdur|jj|_|jdurGt�d�t|jt�r"|j�d�|_t|j�dkr1|jd}}nt|j�dkr>|j\}}ntd��t	|�}nd}d}||_
||_dS)NzIDistribution option extra_path is deprecated. See issue27919 for details.�,r#rrBzY'extra_path' option must be a list, tuple, or comma-separated string with 1 or 2 elementsrA)r4rUrrM�
isinstance�strrS�lenrr�	path_filerb)r<r�rbr=r=r>r^s*


��

zinstall.handle_extra_pathc	Gs2	|D]}d|}t||t|jt||���qdSru)rxr
r)rmr�r=r=r>rc"s
�zinstall.change_rootscCsd	|jsdSttj�d��}|j��D]\}}|�|�r/tj�|�s/|�	d|�t�
|d�qdS)N�~zos.makedirs('%s', 0o700)i�)r"rrKr`r{rW�items�
startswith�isdirZdebug_print�makedirs)r<r&rLr`r=r=r>r\(s��zinstall.create_home_pathcCs(	|js|�d�|j�d�j}|jr|t�krtd��|��D]}|�|�q |j	r/|�
�|jr^|��}|j
rQt|j
�}tt|��D]}|||d�||<qD|�t|j|fd|j�ttjjtj�}ttjj|�}tj�tj�|j��}|jr�|j	r�|js�||vr�t�d|j�dSdSdSdS)NrJz"Can't install when cross-compilingz'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)r6Zrun_commandrUZget_command_objZ	plat_namer7rr�get_sub_commandsr��create_path_filer:�get_outputsr)r��range�executer�maprKr`rsrQ�normcaser-r5rri)r<Z
build_plat�cmd_name�outputsZroot_lenZcounterZsys_pathr-r=r=r>�run4sJ

�������zinstall.runcCsN	tj�|j|jd�}|jr|�t||jgfd|�dS|�	d|�dS)N�.pthzcreating %szpath file '%s' not created)
rKr`rar_r�r5r�rrbrM)r<�filenamer=r=r>r�`s
�
�zinstall.create_path_filecCsj	g}|��D]}|�|�}|��D]}||vr|�|�qq|jr3|jr3|�tj�|j	|jd��|S)Nr�)
r��get_finalized_commandr��appendr�r5rKr`rar_)r<r�r��cmdr�r=r=r>r�ns

���zinstall.get_outputscCs0	g}|��D]}|�|�}|�|���q|S�N)r�r��extend�
get_inputs)r<Zinputsr�r�r=r=r>r�s
zinstall.get_inputscCs	|j��p
|j��Sr�)rUZhas_pure_modulesZhas_ext_modulesr;r=r=r>�has_lib�s
�zinstall.has_libcC�	|j��Sr�)rU�has_headersr;r=r=r>r���
zinstall.has_headerscCr�r�)rU�has_scriptsr;r=r=r>r��r�zinstall.has_scriptscCr�r�)rUZhas_data_filesr;r=r=r>�has_data�r�zinstall.has_datar-r,r.r/Zinstall_egg_infocCsdS)NTr=r;r=r=r>�<lambda>�szinstall.<lambda>) �__name__�
__module__�__qualname__�descriptionrjZboolean_optionsr0r�rrkr?rdrNrOrPrrr}rYr[r]r^rcr\r�r�r�r�r�r�r�r�Zsub_commandsr=r=r=r>rZsL;�
O(		",
�r))rQrXrK�reZ	distutilsrZdistutils.corerZdistutils.debugrZdistutils.sysconfigrZdistutils.errorsrZdistutils.file_utilrZdistutils.utilrr	r
rrZsiter
rr0rwrvryZdistutils_scheme_nameZsys_scheme_nameZsys_keyZ_INSTALL_SCHEMESZ
sys_schemeZmain_keyr��value�sub�replacerVrr=r=r=r>�<module>sh
��
�	
�