Submit
Path:
~
/
/
proc
/
thread-self
/
root
/
opt
/
alt
/
python35
/
lib64
/
python3.5
/
site-packages
/
numpy
/
distutils
/
__pycache__
/
File Content:
unixccompiler.cpython-35.pyc
W��f0 � @ s� d Z d d l m Z m Z m Z d d l Z d d l m Z m Z d d l Td d l m Z d d l m Z e j d d k r� d d l m Z n d d l m Z d d � Z e e d e � d d d d d � Z e e d e � d S)z> unixccompiler - can handle very long argument lists for ar. � )�division�absolute_import�print_functionN)�DistutilsExecError�CompileError)�*)�replace_method)� get_exception� � )�logc C s� | j } | d d k ra d | k r2 | j d � d | k rK | j d � | d g 7} | | _ d t j k r1d d l m } d j t j d j � � } d j | d � d j � � } d j | j � } | | k r� | j | | � } | j � | _ d j | j � } | | k r1| j � | j � | _ d t j j | j d � | f } y/ | j | j | | d | g | d | �Wn- t k r�t t � � } t | � � Yn Xd S) z9Compile a single source files with a Unix-style compiler.r ZaCCz-Aez-Aaz-AA�OPT)�get_config_vars� z%s: %sz-o�displayN)Zcompiler_so�remove�os�environZdistutils.sysconfigr �join�split�replaceZ linker_so�path�basename�spawnr �strr r )�self�obj�src�extZcc_argsZextra_postargsZpp_optsZccompr �optZgcv_optZccomp_sZllink_sr �msg� r! �/unixccompiler.py�UnixCCompiler__compile s4 # r# �_compilec C s� | j | | � \ } } | j | d | �} | j | | � r�y t j | � Wn t t f k rj Yn X| j t j j | � � | | j } xw | r | d d � } | d d � } d t j j | j d � t | � | f } | j | j | g | d | �q� W| j r�d t j j | j d � | f } y! | j | j | g d | �Wq�t k r�t t � � } t | � � Yq�Xn t j d | � d S) 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�OSErrorZmkpathr �dirname�objectsr Zarchiver�lenr �ranlibr r r ZLibErrorr �debug) r r+ Zoutput_libnamer% r. Ztarget_langZoutput_filenameZtmp_objectsr r r! r! r"