/snap/core22/2437/usr/lib/python3.10/distutils/__pycache__
Edit: /snap/core22/2437/usr/lib/python3.10/distutils/__pycache__/bcppcompiler.cpython-310.pyc (6495B)
o
Šbc.: ã @ sp d Z ddlZddlmZmZmZmZmZ ddlm Z m
Z
ddlmZ ddl
mZ ddlmZ G dd „ d e ƒZdS )
zƒdistutils.bcppcompiler
Contains BorlandCCompiler, an implementation of the abstract CCompiler class
for the Borland C++ compiler.
é N)ÚDistutilsExecErrorÚCompileErrorÚLibErrorÚ LinkErrorÚUnknownFileError)Ú CCompilerÚgen_preprocess_options)Ú
write_file)Únewer)Úlogc @ s¾ e Zd ZdZdZi ZdgZg d¢Zee ZdZ dZ
dZd ZZ
d Z
ddd„Z
ddd„Z
ddd„Z
ddd„Zddd„Z
d dd„Z
d!dd„Zd
S )"ÚBCPPCompilerzConcrete class that implements an interface to the Borland C/C++
compiler, as defined by the CCompiler abstract class.
Úbcppz.c)z.ccz.cppz.cxxz.objz.libz.dllz%s%sz.exer c C sn t | |||¡ d| _d| _d| _d | _g d¢| _g d¢| _g d¢| _g d¢| _ g | _
g d¢| _g d¢| _d S ) Nz bcc32.exezilink32.exeztlib.exe)ú/tWMz/O2ú/qú/g0)r z/Odr r )z/Tpdú/Gnr ú/x)r r r )r r r z/r)
r Ú__init__ÚccÚlinkerÚlibÚpreprocess_optionsÚcompile_optionsÚcompile_options_debugÚldflags_sharedÚldflags_shared_debugÚldflags_staticÚldflags_exeÚldflags_exe_debug)ÚselfÚverboseÚdry_runÚforce© r# ú-/usr/lib/python3.10/distutils/bcppcompiler.pyr 5 s
zBCPPCompiler.__init__Nc C sn | ||||||¡\}} }}
}|pg }| d¡ |r!| | j¡ n| | j¡ | D ]‹}
z||
\}}W n ty< Y q)w tj |¡}tj |
¡}
| tj
|
¡¡ |dkrWq)|dkrxz| dd|
|g¡ W n tyv } zt
|ƒ‚d }~ww q)|| jv r€d}n
|| jv rˆd}nd}d|
}z| | jg| |
||g | |g ¡ W q) ty´ } zt
|ƒ‚d }~ww | S ) Nz-cú.resú.rcÚbrcc32z-foÚ z-Pú-o)Ú_setup_compileÚappendÚextendr r ÚKeyErrorÚosÚpathÚnormpathÚmkpathÚdirnameÚspawnr r Ú
_c_extensionsÚ_cpp_extensionsr )r ÚsourcesÚ
output_dirÚmacrosÚinclude_dirsÚdebugÚ
extra_preargsÚextra_postargsÚdependsÚobjectsÚpp_optsÚbuildÚcompile_optsÚobjÚsrcÚextÚmsgÚ input_optÚ
output_optr# r# r$ ÚcompileQ s^ ÿÿ
ÿ€ÿ
ÿþ
þ€ÿzBCPPCompiler.compilec
C s† | ||¡\}}| j||d}| ||¡r;|dg| }|r z| | jg| ¡ W d S ty: } zt|ƒ‚d }~ww t d|¡ d S )N)r7 z/uúskipping %s (up-to-date)) Ú_fix_object_argsÚlibrary_filenameÚ
_need_linkr3 r r r r r: ) r r> Úoutput_libnamer7 r: Útarget_langÚoutput_filenameÚlib_argsrE r# r# r$ Úcreate_static_lib’ s ÿ€ÿzBCPPCompiler.create_static_libc
C sÒ | ||¡\}}| |||¡\}}}|rt dt|ƒ¡ |d ur'tj ||¡}| ||¡ra|t j
krGd}| r?| jd d … }n| jd d … }nd}| rS| j
d d … }n| jd d … }|d u rad}n?tj |¡\}}tj |¡\}}tj |d ¡}tj |d| ¡}dg}|pˆg D ]}| d||f ¡ q‰| t||fd | ¡ ttjj|ƒ}|g}g }|D ]}tj tj |¡¡\}}|d
krÆ| |¡ q®| |¡ q®|D ]
}| dtj |¡ ¡ qÎ| d¡ | |¡ | d
|g¡ | d¡ |D ]}| ||| ¡}|d u r| |¡ qô| |¡ qô| d¡ | d¡ | d
|g¡ | d
¡ | |¡ |
r2|
|d d…<