HOME


sh-3ll 1.0
DIR:/usr/local/lib64/python3.6/site-packages/numpy/distutils/__pycache__/
Upload File :
Current File : //usr/local/lib64/python3.6/site-packages/numpy/distutils/__pycache__/unixccompiler.cpython-36.pyc
3

���h��@s~dZddlZddlmZmZmZddlmZddlm	Z	ddl
mZddlm
Z
dd	�Ze	ed
e�ddd�Ze	ed
e�dS)z>
unixccompiler - can handle very long argument lists for ar.

�N)�CompileError�DistutilsExecError�LibError)�
UnixCCompiler)�replace_method)�_commandline_dep_string)�logcCs�|j}|ddkrFd|kr$|jd�d|kr6|jd�|dg7}||_dtjkr�ddlm}djtjdj��}	dj|d�dj��}
dj|j�}|	|kr�|j|
|	�}|j�|_dj|j	�}|	|kr�|j�|	j�|_	d	tj
j|jd�|f}
t|d
d��rdd
|dg}ng}y*|j
|j||d|g|||
d�Wn4tk
�rp}zt|�}t|��WYdd}~XnX|�r�t|dd��}|jt|||��WdQRXdS)z9Compile a single source files with a Unix-style compiler.rZaCCz-Aez-Aaz-AA�OPT)�get_config_vars� z%s: %sZ
_auto_dependsFz-MMDz-MFz.dz-o)�displayN�a)�compiler_so�remove�os�environ�distutils.sysconfigr
�join�split�replace�	linker_so�path�basename�getattr�spawnr�strr�open�writer)�self�obj�src�extZcc_argsZextra_postargsZpp_optsZccompr
�optZgcv_optZccomp_sZllink_sr�deps�e�msg�f�r'�>/tmp/pip-build-5_djhm0z/numpy/numpy/distutils/unixccompiler.py�UnixCCompiler__compiles@




r)�_compilecCsP|j||�\}}|j||d�}|j||��r@ytj|�Wnttfk
rRYnX|jtjj	|��||j
}xZ|r�|dd�}|dd�}dtjj|jd�t
|�|f}|j|j|g||d�qrW|j�rLdtjj|jd�|f}y|j|j|g|d�Wn4tk
�r<}	zt|	�}
t|
��WYdd}	~	XnXntjd|�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�2z %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�lenrZranlibrrrr�debug)rr2Zoutput_libnamer+r5Ztarget_langZoutput_filenameZtmp_objectsrr$r%r'r'r(�UnixCCompiler_create_static_lib@s8
r6Zcreate_static_lib)NrN)�__doc__rZdistutils.errorsrrrZdistutils.unixccompilerrZnumpy.distutils.ccompilerrZnumpy.distutils.misc_utilrZnumpy.distutilsrr)r6r'r'r'r(�<module>s/
B