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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
U
G=®dh9ã@s’dZddlZddlZddlZddlmZddlmZddlm    Z    m
Z
m Z ddl m Z mZmZmZddlmZejdkr~ddlZGd    d
„d
e    ƒZdS) a9distutils.unixccompiler
 
Contains the UnixCCompiler class, a subclass of CCompiler that handles
the "typical" Unix-style command-line C compiler:
  * macros defined with -Dname[=value]
  * macros undefined with -Uname
  * include search directories specified with -Idir
  * libraries specified with -lllib
  * library search directories specified with -Ldir
  * compile handled by 'cc' (or similar) executable with -c option:
    compiles .c to .o
  * link static library handled by 'ar' command (possibly with 'ranlib')
  * link shared library handled by 'cc -shared'
éN)Ú    sysconfig)Únewer)Ú    CCompilerÚgen_preprocess_optionsÚgen_lib_options)ÚDistutilsExecErrorÚ CompileErrorÚLibErrorÚ    LinkError)ÚlogÚdarwinc
@säeZdZdZddgdgdgddgdgddgddœZejdd…d    krNd
ged
<d d d dddgZdZdZ    dZ
dZ dZ dZ ZZeZejdkrdZd,dd„Zdd„Zd-dd„Zd.d d!„Zd"d#„Zd$d%„Zd&d'„Zd(d)„Zd/d*d+„ZdS)0Ú UnixCCompilerÚunixNÚccz-sharedÚarz-cr)Ú preprocessorÚcompilerÚ compiler_soÚ compiler_cxxÚ    linker_soÚ
linker_exeÚarchiverÚranlibér rz.cz.Cz.ccz.cxxz.cppz.mz.oz.az.soz.dylibz.tbdzlib%s%sÚcygwinz.exec
CsÒ| d||¡}|\}}}t||ƒ}    |j|    }
|r>|
 d|g¡|rN||
dd…<|r\|
 |¡|
 |¡|js~|dks~t||ƒrÎ|r”| tj     
|¡¡z|  |
¡Wn*t k
rÌ} z t | ƒ‚W5d} ~ XYnXdS)Nú-or)Z_fix_compile_argsrrÚextendÚappendÚforcerÚmkpathÚosÚpathÚdirnameÚspawnrr) ÚselfÚsourceZ output_fileZmacrosÚ include_dirsÚ extra_preargsÚextra_postargsÚ
fixed_argsÚignoreÚpp_optsZpp_argsÚmsg©r-úZD:\z\workplace\VsCode\pyvenv\venv\Lib\site-packages\setuptools/_distutils/unixccompiler.pyÚ
preprocessUs$
 
 
 
 
zUnixCCompiler.preprocessc    
Csp|j}tjdkr t |||¡}z | |||d|g|¡Wn*tk
rj}z t|ƒ‚W5d}~XYnXdS)Nr r)rÚsysÚplatformÚ _osx_supportÚcompiler_fixupr#rr)    r$ÚobjÚsrcÚextZcc_argsr(r+rr,r-r-r.Ú_compileos
ÿÿ
zUnixCCompiler._compilerc
Cs²| ||¡\}}|j||d}| ||¡r¢| tj |¡¡| |j|g||j    ¡|j
r®z| |j
|g¡Wq®t k
rž}z t |ƒ‚W5d}~XYq®Xn t  d|¡dS)N)Ú
output_dirúskipping %s (up-to-date))Ú_fix_object_argsÚlibrary_filenameÚ
_need_linkrr r!r"r#rÚobjectsrrr    r Údebug)r$r=Zoutput_libnamer8r>Ú target_langÚoutput_filenamer,r-r-r.Úcreate_static_libzs$ ÿ ÿþþ    zUnixCCompiler.create_static_libc
CsÚ| ||¡\}}| |||¡}|\}}}t||||ƒ}t|ttdƒfƒsPtdƒ‚|dk    rftj     ||¡}| 
||¡rÊ||j |d|g}|    rœdg|dd…<|
r¬|
|dd…<| rº|  | ¡|  tj |¡¡zÎ|tjkrè|jdd…}n|jdd…}| dkrr|jrrd}tj |d¡dkr@d}d||kr@|d7}q&tj ||¡d    kr\d}nd}|j||||<tjd
krŠt ||¡}| ||¡Wn,tk
rÆ}z t|ƒ‚W5d}~XYnXn t d |¡dS) Nz%'output_dir' must be a string or Nonerz-grzc++Úenvéú=Z    ld_so_aixr r9)r:Z _fix_lib_argsrÚ
isinstanceÚstrÚtypeÚ    TypeErrorr r!Újoinr<r=rrr"rZ
EXECUTABLErrrÚbasenamer0r1r2r3r#rr
r r>)r$Z target_descr=r@r8Ú    librariesÚ library_dirsÚruntime_library_dirsÚexport_symbolsr>r'r(Ú
build_tempr?r)Zlib_optsZld_argsZlinkerÚiÚoffsetr,r-r-r.Úlink”sZÿ
ÿÿÿ 
 
   zUnixCCompiler.linkcCsd|S)Nú-Lr-)r$Údirr-r-r.Úlibrary_dir_optionÖsz UnixCCompiler.library_dir_optioncCsd|kpd|kS)NZgcczg++r-)r$Z compiler_namer-r-r.Ú_is_gccÙszUnixCCompiler._is_gcccCs°tj t d¡¡}tjdd…dkr,d|Stjdd…dkrFd|Stjdd…d    krz| |¡rnd
d|gSd d|gS| |¡r¤t d ¡d kršd|Sd|Snd|SdS)NÚCCrr rSéZfreebsdz -Wl,-rpath=ézhp-uxz-Wl,+sz+sZGNULDÚyesz-Wl,--enable-new-dtags,-Rz-Wl,-Rz-R)r r!rJrÚget_config_varr0r1rV)r$rTrr-r-r.Úruntime_library_dir_optionÜs
 
 
z(UnixCCompiler.runtime_library_dir_optioncCsd|S)Nz-lr-)r$Úlibr-r-r.Úlibrary_optionszUnixCCompiler.library_optioncCsœ|j|dd}|j|dd}|j|dd}|j|dd}tjdkrpt d¡}t d|¡}    |    dkrfd    }
n
|     d
¡}
|D] } tj     
| |¡} tj     
| |¡} tj     
| |¡}tj     
| |¡}tjdkr@|   d ¡sà|   d ¡r@|   d ¡s@tj     
|
| d
d…|¡} tj     
|
| d
d…|¡} tj     
|
| d
d…|¡}tj     
|
| d
d…|¡}tj      | ¡rV| Stj      |¡rl|Stj      | ¡r‚| Stj      |¡rt|SqtdS)NÚshared)Zlib_typeÚdylibÚ
xcode_stubÚstaticr ÚCFLAGSz-isysroot\s*(\S+)ú/rCz/System/z/usr/z /usr/local/) r;r0r1rr[ÚreÚsearchÚgroupr r!rIÚ
startswithÚexists)r$Údirsr]r>Zshared_fZdylib_fZ xcode_stub_fZstatic_fÚcflagsÚmZsysrootrTr_r`rbrar-r-r.Úfind_library_file    sF
 
 
 
 ÿþþ 
zUnixCCompiler.find_library_file)NNNNN)NrN)
NNNNNrNNNN)r)Ú__name__Ú
__module__Ú __qualname__Ú compiler_typeZ executablesr0r1Zsrc_extensionsZ obj_extensionZstatic_lib_extensionÚshared_lib_extensionZdylib_lib_extensionZxcode_stub_lib_extensionZstatic_lib_formatZshared_lib_formatZdylib_lib_formatZxcode_stub_lib_formatZ exe_extensionr/r7rArRrUrVr\r^rmr-r-r-r.r -s`ù
 
 
ÿ
 ÿ
ü
B*r )Ú__doc__r r0reÚ    distutilsrÚdistutils.dep_utilrÚdistutils.ccompilerrrrÚdistutils.errorsrrr    r
r r1r2r r-r-r-r.Ú<module>s