AlkantarClanX12
Current Path : /opt/alt/python37/lib64/python3.7/distutils/__pycache__/ |
Current File : //opt/alt/python37/lib64/python3.7/distutils/__pycache__/bcppcompiler.cpython-37.opt-2.pyc |
B YI~dW: � @ st d dl Z d dlmZmZmZmZmZmZ d dlm Z m Z mZ d dlm Z d dlmZ d dlmZ G dd� de �ZdS ) � N)�DistutilsExecError�DistutilsPlatformError�CompileError�LibError� LinkError�UnknownFileError)� CCompiler�gen_preprocess_options�gen_lib_options)� write_file)�newer)�logc @ s� e Zd ZdZi ZdgZdddgZee ZdZdZ dZ d ZZd Z ddd �Zddd�Zddd�Zddd�Zd dd�Zd!dd�Zd"dd�ZdS )#�BCPPCompilerZbcppz.cz.ccz.cppz.cxxz.objz.libz.dllz%s%sz.exer c C s� t �| |||� d| _d| _d| _d | _ddddg| _ddddg| _d d ddg| _d d ddg| _ g | _ d ddg| _d dddg| _d S ) Nz bcc32.exezilink32.exeztlib.exez/tWMz/O2z/qz/g0z/Odz/Tpdz/Gnz/xz/r) r �__init__�cc�linker�libZpreprocess_options�compile_options�compile_options_debug�ldflags_shared�ldflags_shared_debugZldflags_static�ldflags_exe�ldflags_exe_debug)�self�verboseZdry_run�force� r �;/opt/alt/python37/lib64/python3.7/distutils/bcppcompiler.pyr 5 s zBCPPCompiler.__init__Nc C s� | � ||||||�\}} }} }|p$g }|�d� |rB|�| j� n|�| j� �xD| D �]:} y|| \}}W n tk r� wVY nX tj�|�}tj�| �} | � tj� | �� |dkr�qV|dk�ry| �dd| |g� W qV tk �r } zt |��W d d }~X Y qVX qV|| jk�rd}n|| jk�r,d}nd}d| }y,| �| jg| | ||g | |g � W qV tk �r� } zt |��W d d }~X Y qVX qVW | S ) Nz-cz.resz.rcZbrcc32z-fo� z-Pz-o)Z_setup_compile�append�extendr r �KeyError�os�path�normpath�mkpath�dirname�spawnr r � _c_extensions�_cpp_extensionsr )r Zsources� output_dir�macros�include_dirs�debug� extra_preargs�extra_postargsZdepends�objects�pp_optsZbuildZcompile_opts�obj�src�ext�msgZ input_optZ output_optr r r �compileQ sF (zBCPPCompiler.compilec C s� | � ||�\}}| j||d�}| �||�r~|dg| }|r:y| �| jg| � W q� tk rz } zt|��W d d }~X Y q�X nt�d|� d S )N)r* z/uzskipping %s (up-to-date)) �_fix_object_args�library_filename� _need_linkr'