zmc
2023-12-22 9fdbf60165db0400c2e8e6be2dc6e88138ac719a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
U
O±d¿ã@s–dZddlZddlZddlZddlZddlmZmZmZddl    m
Z
ddl m Z ddl mZddlmZdd    „Ze e
d
eƒdd d „Ze e
d eƒdS)z>
unixccompiler - can handle very long argument lists for ar.
 
éN)Ú CompileErrorÚDistutilsExecErrorÚLibError)Ú UnixCCompiler)Úreplace_method)Ú_commandline_dep_string)Úlogc
CsÒ|j}|ddkrFd|kr$| d¡d|kr6| d¡|dg7}||_dtjkrÜddlm}t t tjd¡¡}    t t |dƒd¡¡}
t |j¡} |    | kr¶|      |
|    ¡} t | ¡|_t |j
¡} |    | krÜ|j
t |    ¡|_
dtj   |jd¡|f} t |d    d
ƒrd d |d g}ng}z*|j|j||d|g||| dWn6tk
rx}zt|ƒ}t|ƒd‚W5d}~XYnX|rÎtjdkr¢t ddd|d g¡t|d dƒ}| t|||ƒ¡W5QRXdS)z9Compile a single source files with a Unix-style compiler.rZaCCz-Aez-Aaz-AAZOPT)Úget_config_varsz%s: %sZ _auto_dependsFz-MMDz-MFz.dz-o©ÚdisplayNZzosZchtagz-tcZIBM1047Úa)Ú compiler_soÚremoveÚosÚenvironÚ    sysconfigr    ÚshlexÚ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+úTd:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\numpy/distutils/unixccompiler.pyÚUnixCCompiler__compilesJ 
 
 
 
     ÿÿ
 r-Ú_compilec
CsJ| ||¡\}}|j||d}| ||¡r:zt |¡Wntk
rNYnX| tj |¡¡||j    }|rÄ|dd…}|dd…}dtj 
|j d¡t |ƒ|f}|j |j |g||dql|jrFdtj 
|jd¡|f}z|j |j|g|dWn6tk
r6}    zt|    ƒ}
t|
ƒd‚W5d}    ~    XYnXn t 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é2z %s: adding %d object files to %srr
z%s:@ %szskipping %s (up-to-date))Z_fix_object_argsZlibrary_filenameZ
_need_linkrÚunlinkÚOSErrorÚmkpathrÚdirnameÚobjectsrÚarchiverÚlenrZranlibrrrrÚdebug) r"r5Zoutput_libnamer/r8Z target_langZoutput_filenameZ tmp_objectsr r(r)r+r+r,ÚUnixCCompiler_create_static_libIsD ÿ
  þÿÿÿ
 r9Zcreate_static_lib)NrN)Ú__doc__rrrrÚdistutils.errorsrrrZdistutils.unixccompilerrZnumpy.distutils.ccompilerrZnumpy.distutils.misc_utilrZnumpy.distutilsrr-r9r+r+r+r,Ú<module>s$    5 ÿ
Cÿ