%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /snap/core/17212/usr/lib/python3.5/distutils/command/__pycache__/
Upload File :
Create Path :
Current File : //snap/core/17212/usr/lib/python3.5/distutils/command/__pycache__/install.cpython-35.pyc



|�g�o�@sdZddlZddlZddlmZddlmZddlmZddl	m
Z
ddlmZddl
mZdd	lmZmZmZdd
lmZddlmZddlmZdd
lmZdZddddddddddiZdddddddddddiddddddd dd!dd"id#dd$dd%dd&ddddid'dd(dd(dd)ddddid*eiZer�dd+dd+dd,dd-dd.ied/<dd+dd+dd0dd1dd.ied2<d5ZGd3d4�d4e�ZdS)6zFdistutils.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_SITET�purelibz$base/Lib/site-packages�platlib�headersz$base/Include/$dist_name�scriptsz
$base/Scripts�dataz$base�unix_prefixz/$base/lib/python$py_version_short/site-packagesz3$platbase/lib/python$py_version_short/site-packagesz9$base/include/python$py_version_short$abiflags/$dist_namez	$base/bin�
unix_localz5$base/local/lib/python$py_version_short/dist-packagesz9$platbase/local/lib/python$py_version_short/dist-packagesz6$base/local/include/python$py_version_short/$dist_namez$base/local/binz$base/local�
deb_systemz$base/lib/python3/dist-packagesz#$platbase/lib/python3/dist-packagesz0$base/include/python$py_version_short/$dist_name�	unix_homez$base/lib/pythonz$base/include/python/$dist_name�ntz	$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@s�eZdZdZdadbdcdddddd
fdedfdgddddfdhdidjdkdldmdndodpdqgZdd%d(gZer�ejd.dd/ef�ejd.�d diZ	d0d1�Z
d2d3�Zd4d5�Zd6d7�Z
d8d9�Zd:d;�Zd<d=�Zd>d?�Zd@dA�ZdBdC�ZdDdE�ZdFdG�ZdHdI�ZdJdK�ZdLdM�ZdNdO�ZdPdQ�ZdRdS�ZdTdU�ZdVdW�ZdXdY�ZdZefd[efd\efd]efd^d_d`�fgZdS)r�installz'install everything from build directory�prefix=N�installation prefix�exec-prefix=�.(Unix only) prefix for platform-specific files�home=�+(Unix only) home directory to install under�
install-base=�;base installation directory (instead of --prefix or --home)zinstall-platbase=z8base installation directory for platform-specific files z$(instead of --exec-prefix or --home)�root=�<install everything relative to this alternate root directory�install-purelib=�;installation directory for pure Python module distributions�install-platlib=�8installation directory for non-pure module distributionszinstall-lib=z4installation directory for all module distributions z3(overrides --install-purelib and --install-platlib)�install-headers=�(installation directory for C/C++ headers�install-scripts=�)installation directory for Python scripts�
install-data=�%installation directory for data files�compile�c�compile .py to .pyc [default]�
no-compile�don't compile .py files�	optimize=�O�lalso compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0]�force�f�1force installation (overwrite any existing files)�
skip-build�2skip rebuilding everything (for testing/debugging)�record=�3filename in which to record list of installed files�install-layout=�7installation layout to choose (known values: deb, unix)�userz!install in user site-package '%s'cCsd|_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|_d|_dS)zInitializes options.Nr�)�prefix�exec_prefix�homer@�
prefix_option�install_base�install_platbase�root�install_purelib�install_platlib�install_headers�install_lib�install_scripts�install_datar
�install_userbaser�install_usersite�install_layout�	multiarchr/�optimize�
extra_path�install_path_filer7�
skip_build�warn_dir�
build_base�	build_lib�record)�self�r\�//usr/lib/python3.5/distutils/command/install.py�initialize_options�s8																				
							zinstall.initialize_optionscCsr|js|js|jr=|js-|jr=tdd��|jrd|jsX|jrdtd��|jr�|js�|js�|js�|js�|jr�td��tjdkr�|jr�|j	d�d|_|j
d�tjdkr�|j�n
|j�|j
d	�t
jj�d
}tdd�\}}y
t
j}Wntk
rcd
}YnXd|jj�d|jj�d|jj�d|d|d
d�d|d
|dd|d|d|d|d|i|_tr|j|jd<|j|jd<|j�|j
d�|j|jd<|j|jd<trjd
dlm}td�||j�|j�|j
d �|jr�|j �|j!dkr�|jj"r�|j#|_!n|j$|_!|j%d!d"d#d$d%d&dd�|j&�|j!|_'tj(j)|j!|j*�|_!|j+dk	rN|j,d'd!d"d#d$d%d&�|j
d(�|j-d)d,d-�dS).zFinalizes options.z.must supply either prefix/exec-prefix/home or z)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 platformNzpre-finalize_{unix,other}zpost-finalize_{unix,other}()rrBrC�Z	dist_nameZdist_versionZ
dist_fullname�
py_versionZpy_version_short�Zpy_version_nodot�Z
sys_prefixZsys_exec_prefix�abiflagsZuserbaseZusersitezpost-expand_basedirs()�baseZplatbase)�pprintzconfig vars:zpost-expand_dirs()ZlibrrrrrZlibbasezafter prepending root�buildrXrY)�
build_baserh)�	build_libri).rBrCrDrFrGrr@�os�name�warn�	dump_dirs�
finalize_unix�finalize_other�sys�version�splitrrd�AttributeError�distributionZget_nameZget_versionZget_fullname�config_vars�
HAS_USER_SITErOrP�expand_basedirsrrf�print�expand_dirs�create_home_pathrLZext_modulesrJrI�
convert_paths�handle_extra_path�install_libbase�path�join�
extra_dirsrH�change_rootsZset_undefined_options)r[rarBrCrdrfr\r\r]�finalize_options�s�
	$	
	












	
	



	zinstall.finalize_optionscCs�ts
dSddlm}tj|d�x�|jD]�}|d}|ddkre|dd	�}||jkr�|j|}|j|�}t||�}n|j|�}t||�}tjd||f�q5WdS)
zDumps the list of user options.Nr)�
longopt_xlate�:rA�=z  %s: %s���r�)	rZdistutils.fancy_getoptr�r�debug�user_options�negative_opt�	translate�getattr)r[�msgr�ZoptZopt_name�valr\r\r]rm�s

zinstall.dump_dirscCs�|jdk	s|jdk	r�|jdkrK|jdkrK|jdksx|jdksx|jdksx|jdkr�td��dS|j	r�|j
dkr�td��|j
|_|_|jd�n	|j
dk	r|j
|_|_|jd�n�|j|_|jdkrj|jdk	r7td��tjjtj�|_tjjtj�|_n|jdkr�|j|_|j|_|j|_|jr|jj�dkr�ddl}|jd	�|_|jd
�q�|jj�dkr|jd�q�td
��n�|jrAtjj|j�dks�tjtjks�dtjks�dtjks�dtjkr�|jd�nHtjj|j�dkr�d|_|_d|_|_|jd�dS)z&Finalizes options for posix platforms.NzPinstall-base or install-platbase supplied, but installation scheme is incompletez$User base directory is not specifiedrrz*must not supply exec-prefix without prefix�debrZ	MULTIARCHr�unixrz"unknown value for --install-layoutz
/usr/localZPYTHONUSERBASEZVIRTUAL_ENVZreal_prefixz/usrr)r�)r�)rFrGrLrIrJrKrMrNrr@rOr�
select_schemerDrBrErCrjr~�normpathrprQ�lower�	sysconfigZget_config_varrR�base_prefix�environ�__dict__)r[r�r\r\r]rn�sd						zinstall.finalize_unixcCs�|jrN|jdkr$td��|j|_|_|jtjd�n�|jdk	r�|j|_|_|jd�nv|j	dkr�tj
jtj	�|_	|j	|_|_y|jtj�Wn%t
k
r�tdtj��YnXdS)z)Finalizes options for non-posix platformsNz$User base directory is not specifiedZ_userrz)I don't know how to install stuff on '%s')r@rOrrFrGr�rjrkrDrBr~r�rp�KeyError)r[r\r\r]ro�s"		
zinstall.finalize_othercCsRt|}xAtD]9}d|}t||�dkrt||||�qWdS)z=Sets the install directories by applying the install schemes.�install_N)�INSTALL_SCHEMES�SCHEME_KEYSr��setattr)r[rkZscheme�keyZattrnamer\r\r]r��s



zinstall.select_schemecCs�x{|D]s}t||�}|dk	rtjdksFtjdkrXtjj|�}t||j�}t|||�qWdS)Nr_r)r�rjrkr~�
expanduserr	rur�)r[Zattrs�attrr�r\r\r]�
_expand_attrs�s
zinstall._expand_attrscCs|jdddg�dS)zNCalls `os.path.expanduser` on install_base, install_platbase and
        root.rFrGrHN)r�)r[r\r\r]rwszinstall.expand_basedirscCs#|jddddddg�dS)z+Calls `os.path.expanduser` on install dirs.rIrJrLrKrMrNN)r�)r[r\r\r]ryszinstall.expand_dirscGs>x7|D]/}d|}t||tt||���qWdS)z!Call `convert_path` over `names`.r�N)r�rr�)r[�namesrkr�r\r\r]r{
s

zinstall.convert_pathscCs�|jdkr|jj|_|jdk	r�t|jt�rT|jjd�|_t|j�dkr}|jd}}n3t|j�dkr�|j\}}ntd��t|�}nd}d}||_||_	dS)z4Set `path_file` and `extra_dirs` using `extra_path`.N�,rArrczY'extra_path' option must be a list, tuple, or comma-separated string with 1 or 2 elementsr`)
rTrt�
isinstance�strrr�lenrr�	path_filer�)r[r�r�r\r\r]r|s 		zinstall.handle_extra_pathc	GsDx=|D]5}d|}t||t|jt||���qWdS)z:Change the install directories pointed by name using root.r�N)r�r
rHr�)r[r�rkr�r\r\r]r�1s

zinstall.change_rootscCs�|js
dSttjjd��}x`|jj�D]O\}}|j|�r5tjj|�r5|j	d|�tj
|d�q5WdS)zCreate directories under ~.N�~zos.makedirs('%s', 0o700)i�)r@rrjr~r�ru�items�
startswith�isdirZdebug_print�makedirs)r[rDrkr~r\r\r]rz7s	"zinstall.create_home_pathcCs�|jsO|jd�|jjd�j}|jrO|t�krOtd��x!|j�D]}|j|�q\W|j	r�|j
�|jr|j�}|j
r�t|j
�}x2tt|��D]}|||d�||<q�W|jt|j|fd|j�ttjjtj�}ttjj|�}tjjtjj|j��}|jr�|j	oq|jr�||kr�tjd|j�dS)zRuns the command.rgz"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)rVZrun_commandrtZget_command_objZ	plat_namerWrr�get_sub_commandsr��create_path_filerZ�get_outputsrHr��range�executer�maprjr~r�rp�normcaserLrUrr�)r[Z
build_plat�cmd_name�outputsZroot_lenZcounterZsys_pathrLr\r\r]�runCs6	
	
			!		zinstall.runcCsctjj|j|jd�}|jrN|jt||jgfd|�n|j	d|�dS)zCreates the .pth filez.pthzcreating %szpath file '%s' not createdN)
rjr~rr}r�rUr�rr�rl)r[�filenamer\r\r]r�os		zinstall.create_path_filecCs�g}xS|j�D]E}|j|�}x-|j�D]}||kr5|j|�q5WqW|jr�|jr�|jtjj|j	|jd��|S)z.Assembles the outputs of all the sub-commands.z.pth)
r��get_finalized_commandr��appendr�rUrjr~rr})r[r�r��cmdr�r\r\r]r�}szinstall.get_outputscCsCg}x6|j�D](}|j|�}|j|j��qW|S)z*Returns the inputs of all the sub-commands)r�r��extend�
get_inputs)r[Zinputsr�r�r\r\r]r��s
zinstall.get_inputscCs|jj�p|jj�S)zSReturns true if the current distribution has any Python
        modules to install.)rtZhas_pure_modulesZhas_ext_modules)r[r\r\r]�has_lib�szinstall.has_libcCs
|jj�S)zLReturns true if the current distribution has any headers to
        install.)rt�has_headers)r[r\r\r]r��szinstall.has_headerscCs
|jj�S)zMReturns true if the current distribution has any scripts to.
        install.)rt�has_scripts)r[r\r\r]r��szinstall.has_scriptscCs
|jj�S)zJReturns true if the current distribution has any data to.
        install.)rtZhas_data_files)r[r\r\r]�has_data�szinstall.has_datarLrKrMrNZinstall_egg_infocCsdS)NTr\)r[r\r\r]�<lambda>�szinstall.<lambda>)rNr)rNr)rNr )r!Nr")r#Nr$)r%Nr&)r'Nr()r)Nr*)r+Nr,)r-Nr.)zcompiler0r1)r2Nr3)r4r5r6)zforcer8r9)r:Nr;)r<Nr=)r>Nr?) �__name__�
__module__�__qualname__Zdescriptionr�Zboolean_optionsrvr�rr�r^r�rmrnror�r�rwryr{r|r�rzr�r�r�r�r�r�r�r�Zsub_commandsr\r\r\r]rWs�	
R�>		,				r)zpurelibzplatlibzheaderszscriptszdata)�__doc__rprjZ	distutilsrZdistutils.corerZdistutils.debugrZdistutils.sysconfigrZdistutils.errorsrZdistutils.file_utilrZdistutils.utilrr	r
rrZsiter
rrvZWINDOWS_SCHEMEr�r�rr\r\r\r]�<module>st				

Zerion Mini Shell 1.0