403Webshell
Server IP : 118.27.122.248  /  Your IP : 216.73.217.130
Web Server : Apache
System : Linux web0264.sh.tyo1 4.18.0-553.79.1.lve.el7h.x86_64 #1 SMP Wed Oct 15 16:34:46 UTC 2025 x86_64
User : c9415830 ( 11735)
PHP Version : 8.4.17
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/alt/python36/lib64/python3.6/distutils/tests/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/alt/python36/lib64/python3.6/distutils/tests/__pycache__/test_install.cpython-36.opt-2.pyc
3

w2_�!�@s�ddlZddlZddlZddlZddlmZmZddlmZddl	m
Z
ddlm
Zddl
mZddl	mZddlmZddlmZdd	lmZdd
lmZdd
lmZdd�ZGd
d�dejejejej�Zdd�Z e!dkr�ee ��dS)�N)�captured_stdout�run_unittest)�	sysconfig)�install)�	build_ext)�INSTALL_SCHEMES)�Distribution)�DistutilsOptionError)�	Extension)�supportcCs|tjd�S)N�
EXT_SUFFIX)r�get_config_var)�modname�r�1/opt/alt/python36/lib64/python3.6/test_install.py�_make_ext_namesrc@sDeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dS)�InstallTestCasecs�j�}tjj|d�}tddi�}tjj|d�|_tj|tjj|d�d�|jd<t	|�}||_
|j��j|j
|��j|j|��fdd	�}tjj|dd
�}tjj|dd
�}||j|�||j|�||j|�||jtjj|dd
d��||jtjj|d
��||j|�dS)NZinstallation�nameZfoopkgzsetup.py�lib)Z
build_baseZ	build_libZbuildcs(tjj|�}tjj|�}�j||�dS)N)�os�path�normpath�assertEqual)Zgot�expected)�selfrr�
check_path6szAInstallTestCase.test_home_installation_scheme.<locals>.check_path�python�lib64�include�bin)�mkdtemprr�joinrZscript_namerZDummyCommand�command_objr�home�ensure_finalizedr�install_baseZinstall_platbaseZinstall_libZinstall_platlibZinstall_purelibZinstall_headersZinstall_scriptsZinstall_data)rZbuilddirZdestination�dist�cmdrZlibdirZ
platlibdirr)rr�test_home_installation_scheme s,z-InstallTestCase.test_home_installation_schemecsZtj�_tj�_�j��_tjj	�jd��_
tjj	�jd��_�j
t_�jt_�j
t_�jt_�fdd�}tjj
�_|tj_
�fdd�}�j|�xdD]}�j|t�q�Wtd	d
i�}t|�}dd�|jD�}�jd
|�d|_�jtjj�j
���jtjj�j��|j��jtjj�j
���jtjj�j���jd|j��jd|j�dS)N�B�Scs�jS)N)�tmpdir)r)rrr�_expanduserRsz3InstallTestCase.test_user_site.<locals>._expandusercs.�jt_�jt_�jt_�jt_�jtj_	dS)N)
�
old_user_base�site�	USER_BASE�
old_user_site�	USER_SITE�install_module�
old_expandrr�
expanduserr)rrr�cleanupWs
z/InstallTestCase.test_user_site.<locals>.cleanup�nt_user�	unix_userr�xxcSsg|]\}}}|�qSrr)�.0rZshortZlablerrr�
<listcomp>gsz2InstallTestCase.test_user_site.<locals>.<listcomp>�user��userbaseZusersite)r6r7)r.r/r-r1r0r r+rrr!�	user_base�	user_siter2r4r3Z
addCleanupZassertInrrrZuser_optionsr;ZassertFalse�existsr$Z
assertTrueZconfig_vars)rr,r5�keyr&r'�optionsr)rr�test_user_siteEs:




zInstallTestCase.test_user_sitecCs�tddd��}t|�}|j�|j|jddg�|j|jd�|j|jd�dg|_|j�|j|jdg�|j|jd�|j|jd�d|_|_|j�|j|jd�|j|jd�|j|jd�d|_|jt|j�dS)Nr8z	path,dirs)r�
extra_pathr�dirs�zpath,dirs,again)	rrZhandle_extra_pathrrDZ
extra_dirsZ	path_file�assertRaisesr	)rr&r'rrr�test_handle_extra_path|s$z&InstallTestCase.test_handle_extra_pathcCsftddi�}t|�}d|_d|_|jt|j�d|_d|_|jt|j�d|_d|_|jt|j�dS)Nrr8�prefix�baser#r;)	rrrIr%rGr	Zfinalize_optionsr#r;)rr&r'rrr�test_finalize_options�sz%InstallTestCase.test_finalize_optionsc	Cs�|j�}|jdgdgd�\}}tj|�|jdd�|jdd�t|�}||jd<||_tjj	|d�|_
|j�|j�t
|j
�}z|j�}Wd|j�Xd	d
�|j�D�}ddtjjddtjdd
�g}|j||�dS)NZhelloZsayhi)Z
py_modules�scriptszhello.pyzdef main(): print('o hai')zfrom hello import main; main()r�filelistcSsg|]}tjj|��qSr)rr�basename)r9�linerrrr:�sz/InstallTestCase.test_record.<locals>.<listcomp>zhello.%s.pyczUNKNOWN-0.0.0-py%s.%s.egg-info�)r �create_distr�chdirZ
write_filerr"�rootrr!�recordr$�run�open�read�close�
splitlines�sys�implementation�	cache_tag�version_infor)	r�install_dir�project_dirr&r'�f�content�foundrrrr�test_record�s*



zInstallTestCase.test_recordc

Cstj�}|dk	r|jd|�|j�}|jtddg�gd�\}}tj|�tj	|�t
|�}tj|�|j�t
|�}||jd<||jd<||_tjj|d�|_|j�|j�t|j�}z|j�}Wd|j�Xdd	�|j�D�}td�d
tjdd�g}	|j||	�dS)NzThe %r command is not foundr8z
xxmodule.c)Zext_modulesrrrMcSsg|]}tjj|��qSr)rrrN)r9rOrrrr:�sz:InstallTestCase.test_record_extensions.<locals>.<listcomp>zUNKNOWN-0.0.0-py%s.%s.egg-inforP)�test_supportZmissing_compiler_executableZskipTestr rQr
rrRrZcopy_xxmodule_crZfixup_build_extr$rr"rSrr!rTrUrVrWrXrYrrZr]r)
rr'r^r_r&Zbuildextcmdr`rarbrrrr�test_record_extensions�s4






z&InstallTestCase.test_record_extensionscCsNt|j�}dt_zt��|j�WdQRXWddt_X|jt|j�|�dS)NTF)�lenZlogsr2�DEBUGrrcZ
assertGreater)rZold_logs_lenrrr�test_debug_mode�s
zInstallTestCase.test_debug_modeN)
�__name__�
__module__�__qualname__r(rCrHrKrcrerhrrrrrs%7!rcCs
tjt�S)N)�unittestZ	makeSuiterrrrr�
test_suite�srm�__main__)"rrZrlr.Ztest.supportrrZ	distutilsrZdistutils.command.installrZdistutils.commandr2Zdistutils.command.build_extrrZdistutils.corerZdistutils.errorsr	Zdistutils.extensionr
Zdistutils.testsrZtestrdrZTempdirManagerZEnvironGuardZLoggingSilencerZTestCaserrmrirrrr�<module>s.X

Youez - 2016 - github.com/yon3zu
LinuXploit