Current File : //usr/local/apps/python3/lib/python3.11/test/__pycache__/test_cppext.cpython-311.opt-1.pyc
�

�Ke���ddlZddlZddlZddlZddlZddlmZddlm	Z	ej
dkZejd��Z
ej��Gd�dej����Zedkrej��dSdS)	�N)�support)�	os_helper�win32zsetup_testcppext.pyc���eZdZd�Zd�Zejed��ejdej	d��pdvd��e
j��d�������Zd	�Z
d
S)�
TestCPPExtc�2�|�dd��dS)NF�
_testcpp11ext��check_build��selfs �:/usr/local/apps/python3/lib/python3.11/test/test_cppext.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
}tr"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_TESTCPPEXT�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�;���	%��J�J�|�$�$�$���������t�U���,����	�3����
��U��^��V���	����%�%�%���U��^��/�~�/�/�1��	���#�����rN)�__name__�
__module__�__qualname__rr�unittest�skipIfrB�	sysconfig�get_config_varr�requires_venv_with_piprr�rrrrs�������1�1�1�0�0�0�
�X�_�Z�!8�9�9��X�_��1��1�+�>�>�D�"�E�2�4�4�$�W�#�%�%�9�9�&�%�	4�4�:�9�9�
<�<�<�<�<rr�__main__)�os.pathrCr?rLr-rN�testr�test.supportr�platformrB�findfilerE�requires_subprocess�TestCaserrI�mainrQrr�<module>r[s�������
�
�
�
�������������������"�"�"�"�"�"��l�g�%�
�$�7�#�$9�:�:�������R�R�R�R�R��"�R�R���R�j�z����H�M�O�O�O�O�O��r