Hacked By AnonymousFox
U
e5dP{ � @ s� d Z ddlZddlZddlZddlZddlmZ ddlT ddlm Z m
Z
ddlmZ ddlm
Z
ddlmZ dd lmZ dd
lmZ ddlmZ e�d�Zd
d� ZG dd� de�ZdS )z�distutils.command.build_ext
Implements the Distutils 'build_ext' command, for building extension
modules (currently limited to C extensions, should accommodate C++
extensions ASAP).� N)�Command)�*)�customize_compiler�get_python_version)�get_config_h_filename)�newer_group)� Extension)�get_platform)�log)� USER_BASEz3^[a-zA-Z_][a-zA-Z_0-9]*(\.[a-zA-Z_][a-zA-Z_0-9]*)*$c C s ddl m} | � d S )Nr ��show_compilers)�distutils.ccompilerr
r � r �3/usr/lib64/python3.8/distutils/command/build_ext.pyr
s r
c @ s e Zd ZdZdej Zddddde� fdd d
de fdd
dddde fddddddddddgZddddd gZ d!d"d#e
fgZd$d%� Zd&d'� Z
d(d)� Zd*d+� Zd,d-� Zd.d/� Zd0d1� Zd2d3� Zd4d5� Zejd6d7� �Zd8d9� Zd:d;� Zd<d=� Zd>d?� Zd@dA� ZdBdC� ZdDdE� ZdFdG� Zd"S )H� build_extz8build C/C++ extensions (compile/link to build directory)z (separated by '%s'))z
build-lib=�bz(directory for compiled extension modules)zbuild-temp=�tz1directory for temporary files (build by-products)z
plat-name=�pz>platform name to cross-compile for, if supported (default: %s))�inplace�iziignore build-lib and put compiled extensions into the source directory alongside your pure Python modulesz
include-dirs=�Iz.list of directories to search for header files)zdefine=�DzC preprocessor macros to define)zundef=�Uz!C preprocessor macros to undefine)z
libraries=�lz!external C libraries to link withz
library-dirs=�Lz.directories to search for external C libraries)zrpath=�Rz7directories to search for shared C libraries at runtime)z
link-objects=�Oz2extra explicit link objects to include in the link)�debug�gz'compile/link with debugging information)�force�fz2forcibly build everything (ignore file timestamps))z compiler=�czspecify the compiler type)z parallel=�jznumber of parallel build jobs)�swig-cppNz)make SWIG create C++ files (default is C))z
swig-opts=Nz!list of SWIG command line options)zswig=Nzpath to the SWIG executable)�userNz#add user include, library and rpathr r r r$ r% z
help-compilerNzlist available compilersc C s� d | _ d | _d | _d | _d| _d | _d | _d | _d | _d | _ d | _
d | _d | _d | _
d | _d | _d | _d | _d | _d | _d | _d S )Nr )�
extensions� build_lib� plat_name�
build_tempr �package�include_dirs�define�undef� libraries�library_dirs�rpath�link_objectsr r �compiler�swig�swig_cpp� swig_optsr% �parallel��selfr r r �initialize_optionsj s* zbuild_ext.initialize_optionsc
C s� ddl m} | �ddddddd d
� | jd kr8| jj| _| jj| _|�� }|jdd�}| j d krn| jj pjg | _ t
| j t�r�| j �t
j�| _ tjtjkr�| j �t
j�tjd
�� | j �|�t
jj�� ||kr�| j �|�t
jj�� | �d� | �d� | jd k�rg | _| jd k�rg | _nt
| jt��r:| j�t
j�| _| jd k�rNg | _nt
| jt��rl| j�t
j�| _t
jdk�rh| j�t
j�tjd�� tjtjk�r�| j�t
j�tjd�� | j�r�t
j�| jd�| _nt
j�| jd�| _| j �t
j�t� �� t tdd �}|�r| j�|� | j!dk�r*d}n| j!dd � }t
j�tjd�}|�r\t
j�||�}| j�|� tj"d d� dk�r�tj#�$t
j�tjd���r�| j�t
j�tjddt%� d�� n| j�d� |�&d��r�|j'�s�| j�|�&d �� n| j�d� | j(�r| j(�d!�}d"d#� |D �| _(| j)�r4| j)�d!�| _)| j*d k�rHg | _*n| j*�d$�| _*| j+�r�t
j�t,d
�}t
j�t,d�} t
j�-|��r�| j �|� t
j�-| ��r�| j�| � | j�| � t
| j.t��r�zt/| j.�| _.W n t0k
�r� t1d%��Y nX d S )&Nr )� sysconfigZbuild)r'