Sindbad~EG File Manager

Current Path : /usr/local/lib/python3.11/distutils/tests/__pycache__/
Upload File :
Current File : //usr/local/lib/python3.11/distutils/tests/__pycache__/test_install.cpython-311.opt-1.pyc

�

SԚg�"��4�dZddlZddlZddlZddlZddlmZmZddlm	Z	ddl
mZmZddl
mZddlmZddl
mZdd	lmZdd
lmZddlmZddlmZddlmZd
�ZGd�dejejejej ��Z!e"dkrej#��dSdS)z$Tests for distutils.command.install.�N)�captured_stdout�requires_subprocess)�	sysconfig)�install�
HAS_USER_SITE)r)�	build_ext)�INSTALL_SCHEMES)�Distribution)�DistutilsOptionError)�	Extension)�supportc�0�|tjd��zS)N�
EXT_SUFFIX)r�get_config_var)�modnames �9/usr/local/lib/python3.11/distutils/tests/test_install.py�_make_ext_namers���Y�-�l�;�;�;�;�c���eZdZ�fd�Z�fd�Zd�Zejed��d���Z	d�Z
d�Zd�Ze
��d	���Zd
�Z�xZS)�InstallTestCasec���t�����ttj��|_dS�N)�super�setUp�dictr�_config_vars�_backup_config_vars��self�	__class__s �rrzInstallTestCase.setUp s-���
���
�
����#'�	�(>�#?�#?�� � � rc����t�����tj���tj�|j��dSr)r�tearDownrr�clear�updaterrs �rr"zInstallTestCase.tearDown$sN���
����������$�$�&�&�&���%�%�d�&>�?�?�?�?�?rc	�������}tj�|d��}t	ddi��}tj�|d��|_t
j|tj�|d�����|jd<t|��}||_
|�����|j
|����|j|���fd�}tj�|dd	��}||j|��tj�|t jd	��}||j|��||j|��||jtj�|d
d	d����||jtj�|d����||j|��dS)N�installation�name�foopkgzsetup.py�lib)�
build_base�	build_lib�buildc���tj�|��}tj�|��}��||��dSr)�os�path�normpath�assertEqual)�got�expectedrs  �r�
check_pathzAInstallTestCase.test_home_installation_scheme.<locals>.check_path?sI����'�"�"�3�'�'�C��w�'�'��1�1�H����S�(�+�+�+�+�+r�python�include�bin)�mkdtempr.r/�joinr
�script_namer
�DummyCommand�command_objr�home�ensure_finalizedr1�install_base�install_platbase�install_lib�sys�
platlibdir�install_platlib�install_purelib�install_headers�install_scripts�install_data)r�builddir�destination�dist�cmdr4�libdirrCs`       r�test_home_installation_schemez-InstallTestCase.test_home_installation_scheme)s�����<�<�>�>���g�l�l�8�^�<�<���V�X�.�/�/���7�<�<��*�=�=���$+�$8���g�l�l�8�U�3�3�%�%�%����!�
�d�m�m���������������)�;�7�7�7�����-�{�;�;�;�	,�	,�	,�	,�	,�
����k�5�(�;�;���
�3�?�F�+�+�+��W�\�\�+�s�~�x�H�H�
��
�3�&�
�3�3�3��
�3�&��/�/�/��
�3�&��7�<�<��Y��(�K�K�	M�	M�	M��
�3�&�����[�%�(H�(H�I�I�I��
�3�#�[�1�1�1�1�1rzneed user sitec�p��tj�_tj�_�����_tj�	�jd���_
tj�	�jd���_�j
t_�jt_�j
t_�jt_�fd�}tjj
�_|tj_
�fd�}��|��t r dD]}��|t$���t'ddi��}t)|��}d�|jD��}��d	|��d
|_��tj��j
������tj��j����|�����tj��j
������tj��j������d|j����d|j��dS)
N�B�Sc����jSr)�tmpdir)r/rs �r�_expanduserz3InstallTestCase.test_user_site.<locals>._expanduser\s����;�rc����jt_�jt_�jt
_�jt
_�jtj_	dSr)
�
old_user_base�site�	USER_BASE�
old_user_site�	USER_SITE�install_module�
old_expandr.r/�
expanduser)rs�r�cleanupz/InstallTestCase.test_user_site.<locals>.cleanupas?���!�/�D�N�!�/�D�N�'+�'9�N�$�'+�'9�N�$�!%��B�G���r)�nt_user�	unix_userr'�xxc��g|]\}}}|��	S�rc)�.0r'�short�lables    r�
<listcomp>z2InstallTestCase.test_user_site.<locals>.<listcomp>rs+��%�%�%�.�D�%��4�%�%�%r�user��userbase�usersite)rWrXrVrZrYr8rSr.r/r9�	user_base�	user_siter[r]r\�
addCleanupr�assertInr	r
r�user_optionsrh�assertFalse�existsr>�
assertTrue�config_vars)rrTr^�keyrKrL�optionss`      r�test_user_sitezInstallTestCase.test_user_siteNs:���"�^���!�^����l�l�n�n�������d�k�3�7�7�������d�k�3�7�7�����������#'�>�� �#'�>�� �	�	�	�	�	��'�,���(����	1�	1�	1�	1�	1�	
���� � � ��	4�/�
4�
4���
�
�c�?�3�3�3�3��V�T�N�+�+���d�m�m��%�%��#�%�%�%���
�
�f�g�&�&�&����	
���������7�7�8�8�8����������7�7�8�8�8�	������	
�������t�~�6�6�7�7�7��������t�~�6�6�7�7�7��
�
�j�#�/�2�2�2��
�
�j�#�/�2�2�2�2�2rc�&�tddd���}t|��}|���|�|jddg��|�|jd��|�|jd��dg|_|���|�|jdg��|�|jd��|�|jd��dx|_|_|���|�|jd��|�|jd��|�|jd��d|_|�t|j��dS)Nraz	path,dirs)r'�
extra_pathr/�dirs�zpath,dirs,again)	r
r�handle_extra_pathr1ry�
extra_dirs�	path_file�assertRaisesr�rrKrLs   r�test_handle_extra_pathz&InstallTestCase.test_handle_extra_path�s}���T��E�E�F�F���d�m�m��	�����������&�&�)9�:�:�:�������0�0�0�������/�/�/�!���������������&��2�2�2�������0�0�0�������/�/�/�,0�/���#�.�������������.�.�.�������,�,�,�������-�-�-�+������.��0E�F�F�F�F�Frc�Z�tddi��}t|��}d|_d|_|�t
|j��d|_d|_|�t
|j��d|_d|_|�t
|j��dS)Nr'ra�prefix�baser=rh)	r
rr�r?rr�finalize_optionsr=rhr�s   r�test_finalize_optionsz%InstallTestCase.test_finalize_options�s����V�T�N�+�+���d�m�m����
�!������.��0D�E�E�E� ���������.��0D�E�E�E���
�������.��0D�E�E�E�E�Erc�0�|���}|�dgdg���\}}tj|��|�dd��|�dd��t|��}||jd<||_tj�	|d��|_
|���|���t|j
��}	|���}|���n#|���wxYwd	�|���D��}dd
t"jjzddt"jdd�zg}|�||��dS)
N�hello�sayhi)�
py_modules�scriptszhello.pyzdef main(): print('o hai')zfrom hello import main; main()r�filelistc�L�g|]!}tj�|����"Src�r.r/�basename�rd�lines  rrgz/InstallTestCase.test_record.<locals>.<listcomp>��(��I�I�I�D���!�!�$�'�'�I�I�Irzhello.%s.pyc�UNKNOWN-0.0.0-py%s.%s.egg-info�)r8�create_distr.�chdir�
write_filerr<�rootr/r9�recordr>�run�open�read�close�
splitlinesrB�implementation�	cache_tag�version_infor1)	r�install_dir�project_dirrKrL�f�content�foundr3s	         r�test_recordzInstallTestCase.test_record�sv���l�l�n�n�� �,�,��	�6=�Y�-�@�@���T�
���������
�$@�A�A�A�����!A�B�B�B��d�m�m��&)����#�����W�\�\�+�z�:�:��
����������	�	�	�������	��f�f�h�h�G�
�G�G�I�I�I�I��A�G�G�I�I�I�I����I�I�G�4F�4F�4H�4H�I�I�I�����1C�1M� M��4�s�7G����7K�K�M��	
�����)�)�)�)�)s�3D�D2c���tj��}|�|�d|z��|���}|�tddg��g���\}}t
j|��tj	|��t|��}tj|��|���t|��}||jd<||jd<||_tj�|d��|_|���|���t)|j��}	|���}|���n#|���wxYwd�|���D��}t1d��d	t2jdd
�zg}	|�||	��dS)NzThe %r command is not foundraz
xxmodule.c)�ext_modulesrrr�c�L�g|]!}tj�|����"Srcr�r�s  rrgz:InstallTestCase.test_record_extensions.<locals>.<listcomp>�r�rr�r�)�test_support�missing_compiler_executable�skipTestr8r�rr.r�r
�copy_xxmodule_cr�fixup_build_extr>rr<r�r/r9r�r�r�r�r�r�rrBr�r1)
rrLr�r�rK�buildextcmdr�r�r�r3s
          r�test_record_extensionsz&InstallTestCase.test_record_extensions�s����6�8�8���?��M�M�7�#�=�>�>�>��l�l�n�n�� �,�,��d�\�N�+�+�:-�,�.�.���T�
���������,�,�,���o�o�����,�,�,��$�$�&�&�&��d�m�m��&)����#�(3����%�����W�\�\�+�z�:�:��
����������	�	�	�������	��f�f�h�h�G�
�G�G�I�I�I�I��A�G�G�I�I�I�I����I�I�G�4F�4F�4H�4H�I�I�I��"�4�(�(�4�s�7G����7K�K�M�������)�)�)�)�)s�E?�?Fc�H�t|j��}dt_	t	��5|���ddd��n#1swxYwYdt_n#dt_wxYw|�t|j��|��dS)NTF)�len�logsr[�DEBUGrr��
assertGreater)r�old_logs_lens  r�test_debug_modezInstallTestCase.test_debug_mode�s����4�9�~�~��#���	)� �"�"�
#�
#�� � �"�"�"�
#�
#�
#�
#�
#�
#�
#�
#�
#�
#�
#����
#�
#�
#�
#�$)�N� � ��5�N� �(�(�(�(����3�t�y�>�>�<�8�8�8�8�8s.�A)�A�A)�A�A)�A�A)�)A7)�__name__�
__module__�__qualname__rr"rN�unittest�
skipUnlessrrwr�r�r�rr�r��
__classcell__)r s@rrrs�������
@�@�@�@�@�@�@�@�@�@�
#2�#2�#2�J�X���(8�9�9�63�63�:�9�63�pG�G�G�8F�F�F�**�*�*�6����*�*���*�B	9�	9�	9�	9�	9�	9�	9rr�__main__)$�__doc__r.rBr�rW�test.supportrr�	distutilsr�distutils.command.installrr�distutils.commandr[�distutils.command.build_extrr	�distutils.corer
�distutils.errorsr�distutils.extensionr�distutils.testsr
�testr�r�TempdirManager�EnvironGuard�LoggingSilencer�TestCaserr��mainrcrr�<module>r�s~��*�*�	�	�	�	�
�
�
�
���������=�=�=�=�=�=�=�=�������<�<�<�<�<�<�<�<�7�7�7�7�7�7�1�1�1�1�1�1�5�5�5�5�5�5�'�'�'�'�'�'�1�1�1�1�1�1�)�)�)�)�)�)�#�#�#�#�#�#�(�(�(�(�(�(�<�<�<�c9�c9�c9�c9�c9�g�,��*��-��'�c9�c9�c9�L�z����H�M�O�O�O�O�O��r

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists