Your IP : 216.73.216.213


Current Path : /opt/alt/python311/lib64/python3.11/test/test_cppext/__pycache__/
Upload File :
Current File : //opt/alt/python311/lib64/python3.11/test/test_cppext/__pycache__/__init__.cpython-311.pyc

�

�0�i ��*�ddlZddlZddlZddlZddlZddlmZddlm	Z	ej
�ej
�e
��d��Zej��Gd�dej����Zedkrej��dSdS)�N)�support)�	os_helperzsetup.pyc�2�eZdZejd��d���Zejd��d���Zejej	d��ejde
jd��pdvd��ej��d	�������Z
d
�ZdS)�
TestCPPExt�cpuc�2�|�dd��dS)NF�
_testcpp11ext��check_build��selfs �@/opt/alt/python311/lib64/python3.11/test/test_cppext/__init__.py�test_build_cpp11zTestCPPExt.test_build_cpp11s�������0�0�0�0�0�c�2�|�dd��dS)NT�
_testcpp03extr
rs r�test_build_cpp03zTestCPPExt.test_build_cpp03s�������/�/�/�/�/rztest fails on Windowsz
-fsanitize�	PY_CFLAGS�z(test does not work with analyzing buildsc��tj��5|�||��ddd��dS#1swxYwYdS)N)r�temp_cwd�_check_build)r
�	std_cpp03�extension_names   rrzTestCPPExt.check_builds����
�
!�
!�	9�	9����i��8�8�8�	9�	9�	9�	9�	9�	9�	9�	9�	9�	9�	9�	9����	9�	9�	9�	9�	9�	9s�8�<�<c����d}tj�tjdddd|g}�r1t	��t	dd�|����t
j|d�	��d
}tj�d��r|dz
}tj	r"tj�|d|��}n!tj�|d
|��}��fd�}|ddtddg}|r|�
d��|d|��|ddtdg}|d|��|ddddddg}|d|��|dddddd|��g}|d|��dS)N�envz-X�devz-m�venv�Run:� T��check�pythonz.exe�Scripts�binc�V���r;tdd�|����tj|d���dStj|tjtjd���}|jr7t|jd�����|�d|j����dSdS)	Nrr Tr!)�stdout�stderr�textr)�endz failed with exit code )	�print�join�
subprocess�run�PIPE�STDOUT�
returncoder'�fail)�	operation�cmd�procr
�verboses   ��r�run_cmdz(TestCPPExt._check_build.<locals>.run_cmd<s�����
P��f�c�h�h�s�m�m�,�,�,���s�$�/�/�/�/�/�/�!�~�c�-7�_�-7�->�+/�1�1�1���?�P��$�+�2�.�.�.�.��I�I�$�N�N�T�_�N�N�P�P�P�P�P�P�Pr�	build_extz	--verbosez
-std=c++03�Build�install�Install�showrefcountz-c�passz
Reference runzimport �Import)rr6�sys�
executabler+r,r-r.�endswith�
MS_WINDOWS�os�path�SETUP�append)	r
rr�venv_dirr4�
python_exer#r7r6s	`       @rrzTestCPPExt._check_build(s��������/���~�t�U�D�&�(�C���	)��G�G�G��&�#�(�(�3�-�-�(�(�(���s�$�'�'�'�'��
��>�"�"�6�*�*�	!��&� �J���	?��W�\�\�(�I�z�B�B�F�F��W�\�\�(�E�:�>�>�F�	P�	P�	P�	P�	P�	P��t�U��k�;�0���	%��J�J�|�$�$�$���������t�U��i�!����	�3����
��U��^��V���	����%�%�%���U��^��/�~�/�/�1��	���#�����rN)�__name__�
__module__�__qualname__r�requires_resourcerr�unittest�skipIfrB�	sysconfig�get_config_var�requires_venv_with_piprr�rrrrs��������W��u�%�%�1�1�&�%�1��W��u�%�%�0�0�&�%�0�
�X�_�W�'�)@�A�A��X�_��1��1�+�>�>�D�"�E�2�4�4�$�W�#�%�%�9�9�&�%�	4�4�B�A�9�
<�<�<�<�<rr�__main__)�os.pathrCr?rMr-rO�testr�test.supportrrDr,�dirname�__file__rE�requires_subprocess�TestCaserrI�mainrRrr�<module>r\s�������
�
�
�
�������������������"�"�"�"�"�"�	����R�W�_�_�X�.�.�
�;�;�������T�T�T�T�T��"�T�T���T�n�z����H�M�O�O�O�O�O��r