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__/build_ext.cpython-310.pyc
o

6��aP{�@s�dZddlZddlZddlmZddlmZddlmZddl	m
Z
mZmZddl
mZddlmZdd	lmZdd
lmZddlmZmZmZmZmZmZddlmZdd
lmZm Z Gdd�de�ZdS)zC Modified version of build_ext that handles fortran source files.

�N)�glob)�newer_group)�	build_ext)�DistutilsFileError�DistutilsSetupError�DistutilsError)�	copy_file)�log)�filepath_from_subprocess_output)�
combine_paths)�filter_sources�get_ext_source_files�get_numpy_include_dirs�has_cxx_sources�
has_f_sources�is_sequence)�show_fortran_compilers)�new_ccompiler_opt�CCompilerOptc@s�eZdZdZejgd�ZejdddefgZejddgZdd	�Z	d
d�Z
dd
�Zddd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd�ZdS)rz:build C/C++/F extensions (compile/link to build directory)))z
fcompiler=Nz!specify the Fortran compiler type)z	parallel=�jznumber of parallel jobs)�
warn-errorNz'turn all warnings into errors (-Werror))z
cpu-baseline=Nz4specify a list of enabled baseline CPU optimizations)z
cpu-dispatch=Nz.specify a list of dispatched CPU optimizations)�disable-optimizationNz1disable CPU optimized code(dispatch,simd,fast...))z
simd-test=NzMspecify a list of CPU optimizations to be tested against NumPy SIMD interfacezhelp-fcompilerNz list available Fortran compilersrrcCs8t�|�d|_d|_d|_d|_d|_d|_d|_dS�N)	�
old_build_ext�initialize_options�	fcompiler�parallel�
warn_error�cpu_baseline�cpu_dispatch�disable_optimization�	simd_test��self�r$�C/usr/lib/python3/dist-packages/numpy/distutils/command/build_ext.pyr4s

zbuild_ext.initialize_optionsc
Cs�|jrzt|j�|_Wnty}ztd�|�d}~wwt|jt�r+|j�tj�|_|jp/g}|j	jdur:g|j	_|j	j|_|j�
|�t�|�|�
ddddddd�|jtjd	<dS)
Nz)--parallel/-j argument must be an integer�build)rr)rr)rr)rr)r r )r!r!r!)r�int�
ValueError�
isinstance�include_dirs�str�split�os�pathsep�distribution�extendr�finalize_options�set_undefined_optionsr!r�conf_target_groups)r#�e�	incl_dirsr$r$r%r1>s0
��


�zbuild_ext.finalize_optionsc"	s��jsdS��d��j��rO�jr=�jj�d�r%t�d��j�	d�}n"�j�	d�}d|_|�
�|��d�jjd<n
��d���d�}�j
�|j�nd}ddlm}ddlm}�j}||�j�j�jd��_�j��j��j����jr��jj�d	��jj�d	��j���js�tj� d
ddd
�}tj� ��d�j!|�}tj�"tj� �j#d��}t$�d�r��j%�&�t'�j|�j(�j)|d��_%dd�}ddl*}|�+|�j%�tj� �j#d��_,tj�-�j,�s�t�.�j,�i}	|du�r'|j/p�gD],\}
}|
|	v�r"|	|
|k�r"t�d|
t0|	|
�dd�t0|�dd�f�||	|
<q��jj/�p-gD]\}
}|
|	v�r9�q.||	|
<�q.t1�}�jD]�}
t1�}g}g}g}|
j/D]C}
|
|	v�r�|	|
}||�dg�7}||�dg�7}|�dg�D]
}||v�r�|�|��qt|	�|
i��dg�D]}|�2|��q��qS|�r�|
j/|}t�3d|
j4|
j/|f�||
_/|
j
||
_
|�r�t�3d|
j4|f�|
j5||
_5t6|
j7��r�|�2d�t8|
j7��r�|�2d�|
j9�p�j�:|
j7�}|�r�|�2|�d|v�r�d}nd|v�rd}n
d|v�rd}nd}|�r!||k�r!|
j9�r!t�d |
j4||f�||
_9|�;|��qEd|v}d|v}d|v}|�r`||�j�j�jd��_<�j<}|j�j|d!�|���|��|�=��_<nd�_<|�r��j>}|�j>�j�j�jd"�jd#��_?�j?}|�r�|j@}|��j�|�r�|�A��r�|���|��n��d$|�d�_?nd�_?|�r�j>}|�j>�j�j�jd%�jd#��_B�jB}|�r�|j@}|��j�|�r�|�A��r�|���|��n��d&|�d�_Bnd�_B��C��fd'd(��jD�}|D]C}tj� |d�}�j�stj� �jD|�}t�E�j,�D]&} tj�-|��s&t�.|�| �F��Gd)��s0�qtj� �j,| �}!tH|!|��q�q�dS)*N�	build_src�
build_clibzMbuild_clib already run, it is too late to ensure in-place build of build_clib�r)�new_compiler)�
new_fcompiler)�compiler�verbose�dry_run�forcez-Werror�numpy�	distutils�includeznpy_cpu_dispatch_config.hzccompiler_opt_cache_ext.py�compiler_opt)r;�dispatch_hpathrr�
cache_pathcSs t�d�t�|jdd��dS)Nz2
########### EXT COMPILER OPTIMIZATION ###########T)�full)r	�info�report)�coptr$r$r%rG�s
zbuild_ext.run.<locals>.reportz.libszKlibrary %r defined more than once, overwriting build_info
%s... 
with
%s...i,�	libraries�library_dirs�macros�source_languagesz-updating extension %r libraries from %r to %rz-extending extension %r defined_macros with %r�f77�c++�f90�cz.resetting extension %r language from %r to %r.)�need_cxxF)r;r<r=r>�
requiref90�
c_compilerz!f77_compiler=%s is not available.Tz!f90_compiler=%s is not available.cs"h|]
}��|j��d�d�qS)�.r)�get_ext_fullname�namer,)�.0�extr"r$r%�	<setcomp>Bs��z build_ext.run.<locals>.<setcomp>z.dll)I�
extensions�run_commandr/�has_c_libraries�inplace�have_run�getr	�warn�get_command_obj�ensure_finalized�run�get_finalized_commandrJ�appendr7�distutils.ccompilerr9�numpy.distutils.fcompilerr:r;r<r=r>�	customize�
customize_cmdr�compiler_so�show_customizationr r-�path�joinr6�abspath�
build_temp�hasattrrB�cache_flushrrr�atexit�register�
extra_dll_dir�isdir�makedirsrI�repr�set�addrFrV�
define_macrosr�sourcesr�language�detect_language�update�
_cxx_compiler�cxx_compilerr�
_f77_compiler�
compiler_type�get_version�
_f90_compiler�build_extensions�	build_lib�listdir�lower�endswithr)"r#r7r9r:r�rC�opt_cache_pathrGrr�clibs�libname�
build_info�
all_languagesrX�
ext_languages�c_libs�
c_lib_dirsrK�binfo�m�l�
new_c_libs�ext_language�need_f90_compiler�need_f77_compiler�need_cxx_compilerr;�ctyper�	pkg_roots�pkg_root�shared_lib_dir�fn�runtime_libr$r"r%rc`s|


��

�
�

�
$�






��
��






��
�

��

�
�
��z
build_ext.runcCs|Srr$)r#r{rZr$r$r%�swig_sourcesRszbuild_ext.swig_sourcesc.s�|j}|dust|�std|j��t|�}|sdS|�|j�}|jrJ|�d�}d�|dd��}|d}|�	d�}|�
|�}tj�||�
|��}	ntj�|j|�
|��}	||j}
|j}|jsl|j��slt�d�d}|s}t|
|	d�s}t�d	|j�dSt�d
|j�|jp�g}|jdd�}
|jD]}|
�|f�q�t|j�\}}}}|jjdkr�|r�|�d�||7}g}|jd
kr�|j }n|jdkr�|j!}n|j p�|j!}|dur�t"|d�r�|j#p�gng|_#t"|d�r�|j$p�gng|_$|j%}|r�|dur�t&d|j��|�s|�r|du�rt&d|j��|jdv�r#|du�r#|�'d|j�|jdk�r6|du�r6|�'d|j�d|ji}|j(}|j)t*�}g}g}g}g}|j�s�|�	d�j+}tj�ddd�}tj�||�}|�|�|j�rpdn|}|f|df||f|dffD]\}} �|D]�| ��fdd��dd�D�7} �q��q|j�,�}n|�d �g}!|�r�t�d!�|!|jj-|f|||
|||j||d"�|��7}!|�r�t�d#�|!|jj-|f|||
|||j|d$�|��7}!|�rt�d%�|!|jj.|f||
|||j||d&�|��7}!|�r#t�d'�|!|j.|f||
|||j||d&�|��7}!g}"g}#|�r�t�d(�|j/dd�}$tj�|j(tj�0|�
|���}%|�1|%�|j2du�rTt3d)�}&|"|�4|$|%�7}"|#|j.||j(|
||j|"|jd*�7}#|j2du�r�t3d)�D]H}'|'|&v�r��qwtj�|%|'�}(tj�5|'�tj�5|(�k�r��qwtj�6|(��r�t�7|(�z	|�8|'|%�W�qwt9�y�t�'d+|'|%f�Y�qww|�r�t�d,�|#|j.||j(|
||j|"|jd*�7}#|#�r�|�:|j��s�|#})|!}*ng})|!|#}*|j;�r�|*�<|j;�|j=�p�g}|�>|�dd�}+|j?dd�},|jj@}-|jjd-v�r!|�A||+|,�n|jdv�r/|du�r/|j@}-|jdk�r=|du�r=|j@}-|du�rM|�B|*|+||,|)�\}*}+|-|*|	|+|,|jC||�D|�|j|j(|jd.�
dS)/Nzjin 'ext_modules' option (extension '%s'), 'sources' must be present and must be a list of source filenamesrTr����build_pyz*Detected changes on compiler optimizationsT�newerz$skipping '%s' extension (up-to-date)zbuilding '%s' extension�msvcz/Zm1000rOrM�extra_f77_compile_args�extra_f90_compile_argsz5extension %r has C++ sourcesbut no C++ compiler foundz>extension %r has Fortran sources but no Fortran compiler found)rMrOzTextension %r has Fortran libraries but no Fortran linker found, using default linkerrNzLextension %r has C++ libraries but no C++ linker found, using default linker�dependsr6r?r@rA)z.dispatch.c)z
.dispatch.cppz
.dispatch.cxxcs&g|]}|���r����|���qSr$)r��pop�index)rW�s��_ext�_srcr$r%�
<listcomp>�s

��z-build_ext.build_extension.<locals>.<listcomp>)�NPY_DISABLE_OPTIMIZATIONr8z#compiling C++ dispatch-able sources)�
output_dir�src_dirrKr*�debug�extra_postargs�	ccompilerz!compiling C dispatch-able sources)r�r�rKr*r�r�zcompiling C sources)r�rKr*r�r�zcompiling C++ sourcesz#compiling Fortran 90 module sourcesz*.mod)r�rKr*r�r�r�zfailed to move %r to %rzcompiling Fortran sources)r��intelw�intelemw)rIrJ�runtime_library_dirsr��export_symbolsr�ro�target_lang)Er{rrrV�listrUr]r,rmrd�get_package_dirr-rl�get_ext_filenamer�r�r>r rB�	is_cachedr	r�rrF�extra_compile_argsrz�undef_macrosrerr;r�r|r�r�rpr�r�rrr`ror*rr6�cpu_baseline_flags�try_dispatch�compile�module_dirs�dirname�mkpath�module_dir_switchr�module_optionsrn�isfile�remove�	move_filer�can_ccompiler_link�
extra_objectsr0�extra_link_args�
get_librariesrJ�link_shared_object�_libs_with_msvc_and_fortran�_process_unlinkable_fobjectsr��get_export_symbols).r#rXr{�fullname�modpath�package�baser��package_dir�ext_filenamer��
force_rebuild�
extra_argsrK�undef�	c_sources�cxx_sources�	f_sources�fmodule_sourcesrr��kwsr�r*�copt_c_sources�copt_cxx_sources�copt_baseline_flags�copt_macros�bsrc_dirrC�copt_build_src�_srcs�_dst�	c_objectsr��	f_objectsr��module_build_dir�existing_modules�f�t�unlinkable_fobjects�objectsrIrJ�linkerr$r�r%�build_extensionVs���


�
�




�


����������


��
��

��	�
��
��

��

��
��

��
��
�
�zbuild_ext.build_extensioncCsP|�d�j}|�d�j}|jjtj�|d�g|jd�}|jj	|d||j
d�dS)Nr6r7zgfortran_vs2003_hack.c)r��_gfortran_workaround)r�r�)rdr6r7r;r�r-rlrmro�create_static_libr�)r#r�r6r7r�r$r$r%�_add_dummy_mingwex_symJs��

�z build_ext._add_dummy_mingwex_symc

Cst|�}t|�}t|�}|dd�D]`}|D][}tj�||d�}tj�|�rq|�|�t|d��}	|�|	���	��Wd�n1sEwYtj�||d�}
t|
d��}	|�|	���	��Wd�n1slwYqq|r�dd�|D�}|j
||j|jd�}|�|�||fS)Nz	.fobjects�rz	.cobjectscSsg|]}tj�|��qSr$)r-rlrn)rW�objr$r$r%r�nsz:build_ext._process_unlinkable_fobjects.<locals>.<listcomp>)r�rt)
r�r-rlrmr�r��openr0�read�
splitlines�wrap_unlinkable_objectsrort)
r#r�rIrrJr��lib�libdir�fake_libr��c_lib�fobjects�wrappedr$r$r%r�Ss2
�����
z&build_ext._process_unlinkable_fobjectsc
Cs�|durdS|D]g}|�d�rqd}|pgD]}tj�|d|�}tj�|�r+d}nq|r/qd}|D]/}tj�|d|�}tj�|�rbtj�|j|d�}t||�|j|vr^|�|j�d}nq3|rfqt�	d||f�qg}	|j
D]'}
|
�d�r�z
t�d	d
|
g�}
Wnt
tjfy�Ynwt|
�}
|	�|
�qu|�|	�|jD]9}|�d�s�|�|�t|	d|d�}|r�tj�|j|d�}
tj�|
�s�t|d
|
�|j|vr�|�|j�q�dS)Nr�Fz%s.libTzlib%s.az.libz+could not find library %r in directories %sz/usr/lib�cygpathz-wr�z.ar)�
startswithr-rlrmr�rorrer	r`rJ�
subprocess�check_output�OSError�CalledProcessErrorr
r0rIr)r#r�c_libraries�c_library_dirsr��
fileexistsr��libfile�libfile2�
f_lib_dirs�dirr��p�dst_namer$r$r%r�vsj
�

�	�

�




��z%build_ext._libs_with_msvc_and_fortrancCs.|�|j�g}|jD]	}|�t|��q|Sr)�check_extensions_listrZr0r
)r#�	filenamesrXr$r$r%�get_source_files�s

zbuild_ext.get_source_filesc	CsP|�|j�g}|jD]}|jsq|�|j�}|�tj�|j	|�
|���q|Sr)rrZr{rUrVrer-rlrmr�r�)r#�outputsrXr�r$r$r%�get_outputs�s
�zbuild_ext.get_outputsr)�__name__�
__module__�__qualname__�descriptionr�user_options�help_optionsr�boolean_optionsrr1rcr�r�r�r�r�rrr$r$r$r%rs*��
"
su	#=r)!�__doc__r-rr�distutils.dep_utilr�distutils.command.build_extrr�distutils.errorsrrr�distutils.file_utilr�numpy.distutilsr	�numpy.distutils.exec_commandr
�numpy.distutils.system_infor�numpy.distutils.misc_utilrr
rrrr�'numpy.distutils.command.config_compilerr�numpy.distutils.ccompiler_optrrr$r$r$r%�<module>s 

https://t.me/RX1948 - 2025