관리-도구
편집 파일: build_ext.cpython-310.pyc
o 6��f�{ � @ 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 �B/opt/alt/python310/lib64/python3.10/distutils/command/build_ext.pyr s r c @ s e Zd ZdZdej Zddddde� fdd d de fdd dddde fddddddddddgZg d�Z ddde fgZd d!� Zd"d#� Z d$d%� Zd&d'� Zd(d)� Zd*d+� Zd,d-� Zd.d/� Zd0d1� Zejd2d3� �Zd4d5� Zd6d7� Zd8d9� Zd:d;� Zd<d=� Zd>d?� Zd@dA� ZdBdC� ZdS )D� 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 rpath)r 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 u r| jj| _| jj| _|�� }|jdd�}| j d u r7| jj p5g | _ t | j t�rE| j �t j�| _ tjtjkrW| j �t j�tjd �� | j �|�t jj�� ||krq| j �|�t jj�� | �d� | �d� | jd u r�g | _| jd u r�g | _nt | jt�r�| j�t j�| _| jd u r�g | _nt | jt�r�| j�t j�| _t jdk�r-| j�t j�tjd�� tjtjkr�| j�t j�tjd�� | jr�t j�| jd�| _n t j�| jd�| _| j �t j�t� �� t tdd �}|�r| j�|� | j!dk�rd}n| j!dd � }t j�tjd�}|�r't j�||�}| j�|� tj"d d� dk�r\tj#�$t j�tjd���rV| j�t j�tjddt%� d�� n| j�d� |�&d��rv|j'�sp| j�|�&d �� n| j�d� | j(�r�| j(�d!�}d"d#� |D �| _(| j)�r�| j)�d!�| _)| j*d u �r�g | _*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�z t/| j.�| _.W d S t0�y� t1d%��w d S )&Nr )� sysconfigZbuild)r'