Файловый менеджер - Редактировать - /home/digitalm/venv/lib/python3.7/site-packages/numpy/distutils/__pycache__/unixccompiler.cpython-37.pyc
Назад
B �5�g � @ s� d Z ddlZddlZddlZddlmZmZmZ ddlm Z ddl mZ ddlm Z ddlmZ dd � Zee d e� ddd�Zee d e� dS )z> unixccompiler - can handle very long argument lists for ar. � N)�CompileError�DistutilsExecError�LibError)� UnixCCompiler)�replace_method)�_commandline_dep_string)�logc C s� | j }|d dkrFd|kr$|�d� d|kr6|�d� |dg7 }|| _ dtjkr�ddlm} d�tjd �� �} d�|d�d �� �} d�| j �}| |kr�|�| | �}|�� | _ d�| j �}| |kr�|�� | �� | _ d tj �| j d �|f } t| d d��rdd |d g}ng }y*| j | j | |d|g | | | d� W n6 tk �rr } zt|�}t|�d�W dd}~X Y nX |�r�tjdk�r�t�ddd|d g� t|d d��}|�t|||�� W dQ R X dS )z9Compile a single source files with a Unix-style compiler.r ZaCCz-Aez-Aaz-AA�OPT)�get_config_vars� z%s: %sZ _auto_dependsFz-MMDz-MFz.dz-o)�displayNZzosZchtagz-tcZIBM1047�a)�compiler_so�remove�os�environ� sysconfigr �join�split�replace� linker_so�path�basename�getattr�spawnr �strr �sys�platform� subprocess�check_output�open�writer )�self�obj�src�extZcc_argsZextra_postargsZpp_optsZccompr �optZgcv_optZccomp_sZllink_sr �deps�e�msg�f� r+ �S/home/digitalm-up/venv/lib/python3.7/site-packages/numpy/distutils/unixccompiler.py�UnixCCompiler__compile sD r- �_compilec C sR | � ||�\}}| j||d�}| �||��rByt�|� W n ttfk rR Y nX | �tj� |�� || j }xZ|r�|dd� }|dd� }dtj�| jd �t |�|f }| j| j|g | |d� qrW | j�rNdtj�| jd �|f }y| j| j|g |d� W n6 tk �r> } zt| �} t| �d�W dd} ~ X Y nX nt�d|� dS ) a� Build a static library in a separate sub-process. Parameters ---------- objects : list or tuple of str List of paths to object files used to build the static library. output_libname : str The library name as an absolute or relative (if `output_dir` is used) path. output_dir : str, optional The path to the output directory. Default is None, in which case the ``output_dir`` attribute of the UnixCCompiler instance. debug : bool, optional This parameter is not used. target_lang : str, optional This parameter is not used. Returns ------- None )� output_dirN�2 z %s: adding %d object files to %sr )r z%s:@ %szskipping %s (up-to-date))Z_fix_object_argsZlibrary_filenameZ _need_linkr �unlink�IOError�OSError�mkpathr �dirname�objectsr �archiver�lenr Zranlibr r r r �debug)r"