https://t.me/RX1948
Server : Apache
System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User : dh_edsupp ( 6597262)
PHP Version : 8.2.26
Disable Function : NONE
Directory :  /lib/python3/dist-packages/numpy/distutils/command/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/numpy/distutils/command/__pycache__/config.cpython-310.pyc
o

6��a�P�@s�ddlZddlZddlZddlZddlZddlZddlmZddlm	Z	ddl
mZddlm
Z
ddlmZmZddl
Z
ddlmZddlmZdd	lmZmZmZmZmZmZmZd
e	d<de	d
<Gdd�de�ZGdd�d�ZdS)�N)�config)�LANG_EXT)�log)�	copy_file)�CompileError�	LinkError)�filepath_from_subprocess_output)�generate_manifest)�check_gcc_function_attribute�,check_gcc_function_attribute_with_intrinsics�check_gcc_variable_attribute�check_gcc_version_at_least�check_inline�check_restrict�check_compiler_gccz.f�f77z.f90�f90c@s�eZdZejdg7_dd�Zdd�Zdd�Zdd	�Zd
d�Z	d.dd�Z
	d/dd�Z	d/dd�Z		d0dd�Z
d1dd�Z			d2dd�Z			d2dd�Zdd�Zdd �Zd!d"�Zd#d$�Zd%d&�Zd'd(�Zd3d*d+�Z			d4d,d-�ZdS)5r)z
fcompiler=Nz!specify the Fortran compiler typecCsd|_t�|�dS�N)�	fcompiler�
old_config�initialize_options��self�r�@/usr/lib/python3/dist-packages/numpy/distutils/command/config.pyr$szconfig.initialize_optionsc
Cs@t�|�ddlm}m}tjdkrj|jjdvrj|jj	sJz|j�
�Wn&tyI}zt�
d�||jjjf}tt�
d��tj�|�|�d}~wwddlm}|��dkrj|jj|jjfD]}d	|vri|�d	�q^t|j|�s�||j|jd
|jd�|_|jdur�|j�|j�|j��r�|j�|�|j� �dSdSdSdS)Nr)�	FCompiler�
new_fcompiler�win32)�msvc�intelw�intelemwas                        Could not initialize compiler instance: do you have Visual Studio
                        installed?  If you are trying to build with MinGW, please use "python setup.py
                        build -c mingw32" instead.  If you have Visual Studio installed, check it is
                        correctly installed, and the right version (VS 2008 for python 2.6, 2.7 and 3.2,
                        VS 2010 for >= 3.3).

                        Original exception was: %s, and the Compiler class was %s
                        ============================================================================zd                        ============================================================================)�
msvc9compiler�
z	/MANIFEST�)�compiler�dry_run�force�
c_compiler)!r�_check_compiler�numpy.distutils.fcompilerrr�sys�platformr$�
compiler_type�initialized�
initialize�IOError�textwrap�dedent�	__class__�__name__�print�	distutils�errors�DistutilsPlatformErrorr!�get_build_version�ldflags_shared�ldflags_shared_debug�append�
isinstancerr%�	customize�distribution�get_version�
customize_cmd�show_customization)rrr�e�msgr!�ldflagsrrrr((sJ
�	�
���
��

�zconfig._check_compilerc	
Cs�ddlm}ddlm}|j}|dvr|j|_|jdur#|d|f��z	||f|�}Wn||fy@}z||_||�d}~ww||_|S)Nr)r)�DistutilsExecError�rrz%s compiler is not set)�distutils.ccompilerr�distutils.errorsrEr$r)	r�mth�lang�argsrrE�
save_compiler�retrBrrr�_wrap_methodYs 
��zconfig._wrap_methodcCs4|�tj|||||f�\}}|j�|d�||fS)Nz.d)rNr�_compile�
temp_filesr;)r�body�headers�include_dirsrJ�src�objrrrrOis


�zconfig._compilec

Cs�|jjdkr�|p	gdd�}|pgdd�}|dvr_d}|jr_|jjp$gD]'}|�d�rGz
t�dd|g�}WnttjfyBYnwt	|�}|�
|�q%|jjpRgD]}||vr^|�
|�qS|D]a}|�d�riqad}	|pngD]}
tj
�|
d|�}tj
�|�r�d	}	nqo|	r�qad}	|D])}
tj
�|
d
|�}tj
�|�r�tj
�|
d|�}t||�|j�
|�d	}	nq�|	r�qat�d||f�qan
|jjdkr�t|�|�tj|||||||f�S)
NrrF�cz/usr/lib�cygpathz-wFz%s.libTzlib%s.az+could not find library %r in directories %s�mingw32)r$r,r�library_dirs�
startswith�
subprocess�check_output�OSError�CalledProcessErrorrr;�	libraries�os�path�join�isfilerrPr�warnr	rNr�_link)
rrQrRrSr_rYrJ�d�libname�
fileexists�libdir�libfile�libfile2rrrreqsj

��
��
���
��zconfig._linkNrVcCs|��|�d|g|�S)Nz2/* we need a dummy line to make distutils happy */)r(�try_compile)r�headerrSrYrJrrr�check_header�s
�zconfig.check_headercCs(|��t�d�||f}|�|||�S)Nz�
            int main(void)
            {
            #ifndef %s
                (void) %s;
            #endif
                ;
                return 0;
            }�r(r0r1rl�r�symbolrRrSrQrrr�
check_decl�s
�
zconfig.check_declcCs&|��t�d�|f}|�|||�S)Nz�
            int main(void)
            {
            #if %s
            #else
            #error false or undefined macro
            #endif
                ;
                return 0;
            }rorprrr�check_macro_true�s
	�zconfig.check_macro_truecCs�|��t�d�d|i}d}z,z|�|d|i||d�d}Wn
tjjy-d}YnwW|��|SW|��|S|��w)zYCheck type availability. Return True if the type can be compiled,
        False otherwisez�
            int main(void) {
              if ((%(name)s *) 0)
                return 0;
              if (sizeof (%(name)s))
                return 0;
            }
            �nameF�typerVT)r(r0r1rOr5r6r�_clean)r�	type_namerRrSrYrQ�strrr�
check_type�s*�	����
�zconfig.check_typec	CsZ|��t�d�}|�|d|i||d�|��|rDt�d�}|D]!}z|�|||d�||d�|��|WStyCYq"wt�d�}d}d}		z|�|||	d�||d�|��Wntyt|	d	}d
|	d	}	YnwqN|	}
||
kr�|
|d
|}	z|�|||	d�||d�|��|	}
Wn
ty�|	d	}Ynw||
ks||S)zCheck size of a given type.a,
            typedef %(type)s npy_check_sizeof_type;
            int main (void)
            {
                static int test_array [1 - 2 * !(((long) (sizeof (npy_check_sizeof_type))) >= 0)];
                test_array [0] = 0

                ;
                return 0;
            }
            rurVaW
                typedef %(type)s npy_check_sizeof_type;
                int main (void)
                {
                    static int test_array [1 - 2 * !(((long) (sizeof (npy_check_sizeof_type))) == %(size)s)];
                    test_array [0] = 0

                    ;
                    return 0;
                }
                )ru�sizea3
            typedef %(type)s npy_check_sizeof_type;
            int main (void)
            {
                static int test_array [1 - 2 * !(((long) (sizeof (npy_check_sizeof_type))) <= %(size)s)];
                test_array [0] = 0

                ;
                return 0;
            }
            rTr#�)r(r0r1rOrvr)rrwrRrSrY�expectedrQrz�low�mid�highrrr�check_type_size�s^
�
�
�
������	zconfig.check_type_sizeFc	
Cs�|��g}	|rt|�tkr|	�|�n|	�d|�|	�d�|	�d|�|	�d�|	�d�|rC|dur9d}|	�d||f�n|	�d|�|	�d	�|	�d
�d�|	�d}	|�|	||||�S)N�int %s (void);�#ifdef _MSC_VER�#pragma function(%s)�#endif�int main (void) {��	  %s(%s);�  %s;�  return 0;�}�
)r(ru�strr;rb�try_link)
r�funcrRrSr_rY�decl�call�	call_argsrQrrr�
check_func<s*





�zconfig.check_funcc	Cs|��g}	|r|��D]
\}
}|r|	�d|
�q|	�d�|D]	}|	�d|�q!|	�d�|	�d�|rg|D],}
|
|vr^||
r^|rM|
|vrM||
sPd}
n||
}
|	�d|
|
f�q9|	�d|
�q9n|D]	}
|	�d|
�qi|	�d	�|	�d
�d�|	�d}	|�|	||||�S)a0Check a list of functions at once.

        This is useful to speed up things, since all the functions in the funcs
        list will be put in one compilation unit.

        Arguments
        ---------
        funcs : seq
            list of functions to test
        include_dirs : seq
            list of header paths
        libraries : seq
            list of libraries to link the code snippet to
        library_dirs : seq
            list of library paths
        decl : dict
            for every (key, value), the declaration in the value will be
            used for function in key. If a function is not in the
            dictionary, no declaration will be used.
        call : dict
            for every item (f, value), if the value is True, a call will be
            done to the function f.
        r�r�r�r�r�r�r�r�r�r�r�)r(�itemsr;rbr�)r�funcsrRrSr_rYr�r�r�rQ�f�vr�rKrrr�check_funcs_once^s:�


�



�zconfig.check_funcs_oncecC�t|�S)zUReturn the inline keyword recognized by the compiler, empty string
        otherwise.)rrrrrr��zconfig.check_inlinecCr�)zWReturn the restrict keyword recognized by the compiler, empty string
        otherwise.)rrrrrr�r�zconfig.check_restrictcCr�)z$Return True if the C compiler is gcc)rrrrrr�szconfig.check_compiler_gcccCst|||�Sr)r
)r�	attributertrrrr
��z#config.check_gcc_function_attributecCst|||||�Sr)r)rr�rt�code�includerrrr�s�z3config.check_gcc_function_attribute_with_intrinsicscCs
t||�Sr)r)rr�rrrr�s
z#config.check_gcc_variable_attributercCst||||�S)zYReturn True if the GCC version is greater than or equal to the
        specified version.)r
)r�major�minor�
patchlevelrrrr
�sz!config.check_gcc_version_at_leastc
Csltjdtdd�|��d\}}	z�t�}
z|�||||||�\}}}
|
��Wnty6|
j}	|
���wt	j
�d|
�}
z
tj
|
gdd�}	Wn$tjy`}z|j}d}	WYd}~nd}~wtyld	}d}	Ynwt|	�}	tt	d
�r�t	�|�}t	�|�r�t	�|�}t�d|f�|tjkr�t�n|}t�d�Wnttfy�t�d
�Ynw|��||	fS)z�Try to compile, link to an executable, and run a program
        built from 'body' and 'headers'. Returns the exit status code
        of the program and its output.
        z�
+++++++++++++++++++++++++++++++++++++++++++++++++
Usage of get_output is deprecated: please do not 
use it anymore, and avoid configuration checks 
involving running executable on the target machine.
+++++++++++++++++++++++++++++++++++++++++++++++++
r{)�
stacklevel)�r��.)�cwdr�N��WEXITSTATUSz subprocess exited with signal %dzsuccess!zfailure.)�warningsrd�DeprecationWarningr(�
GrabStdoutre�restore�	Exception�datar`rarbr[r\r^�
returncoder]r�hasattrr��WIFSIGNALED�WTERMSIGr�error�signal�SIGINT�KeyboardInterrupt�inforrrv)rrQrRrSr_rYrJ�use_tee�exitcode�output�grabberrTrU�exe�exc�
exitstatus�sigrrr�
get_output�sX�

����




��zconfig.get_output)NNrV)NN)NNN)NNNN)NNNNFFN)rr)NNNNrVN)r3�
__module__�__qualname__r�user_optionsrr(rNrOrernrrrsryr�r�r�rrrr
rrr
r�rrrrrsJ�1
6
�
�
�
T
�#
�=
�rc@s,eZdZdd�Zdd�Zdd�Zdd�Zd	S)
r�cCstj|_d|_|t_dS)Nr�)r*�stdout�
sys_stdoutr�rrrr�__init__�s
zGrabStdout.__init__cCs|j�|�|j|7_dSr)r��writer�)rr�rrrr��szGrabStdout.writecCs|j��dSr)r��flushrrrrr�szGrabStdout.flushcCs|jt_dSr)r�r*r�rrrrr�r�zGrabStdout.restoreN)r3r�r�r�r�r�r�rrrrr��s
r�)r`r�r[r*r0r��distutils.command.configrrrr5r�distutils.file_utilrrGrr�numpy.distutils.exec_commandr� numpy.distutils.mingw32ccompilerr	� numpy.distutils.command.autodistr
rrr
rrrr�rrrr�<module>s,$Z

https://t.me/RX1948 - 2025