%PDF- %PDF-
Direktori : /usr/local/lib/python3.8/distutils/__pycache__/ |
Current File : //usr/local/lib/python3.8/distutils/__pycache__/bcppcompiler.cpython-38.pyc |
U q©ßaW: ã @ sx d Z ddlZddlmZmZmZmZmZmZ ddl m Z mZmZ ddl mZ ddlmZ 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ÚDistutilsPlatformErrorÚCompileErrorÚLibErrorÚ LinkErrorÚUnknownFileError)Ú CCompilerÚgen_preprocess_optionsÚgen_lib_options)Ú write_file)Únewer)Úlogc @ sŽ e Zd ZdZdZi ZdgZdddgZee ZdZ dZ d Zd ZZ dZdd d„Zddd„Zddd„Zd dd„Zd!dd„Zd"dd„Zd#dd„ZdS )$ÚBCPPCompilerzConcrete class that implements an interface to the Borland C/C++ compiler, as defined by the CCompiler abstract class. Zbcppz.cz.ccz.cppz.cxxz.objz.libz.dllz%s%sz.exer c C s„ t | |||¡ d| _d| _d| _d | _ddddg| _ddddg| _d d ddg| _d d ddg| _ g | _ d ddg| _d dddg| _d S ) Nz bcc32.exezilink32.exeztlib.exez/tWMz/O2z/qz/g0z/Odz/Tpdz/Gnz/xz/r) r Ú__init__ÚccÚlinkerÚlibZpreprocess_optionsÚcompile_optionsÚcompile_options_debugÚldflags_sharedÚldflags_shared_debugZldflags_staticÚldflags_exeÚldflags_exe_debug)ÚselfÚverboseÚdry_runÚforce© r ú2/usr/local/lib/python3.8/distutils/bcppcompiler.pyr 5 s zBCPPCompiler.__init__Nc C s– | ||||||¡\}} }} }|p$g }| d¡ |rB| | j¡ n| | j¡ | D ]<} z|| \}}W n tk r€ Y qRY nX tj |¡}tj | ¡} | tj | ¡¡ |dkr¶qR|dkrz| dd| |g¡ W qR tk r } zt |ƒ‚W 5 d }~X Y qRX qR|| jkrd}n|| jkr*d}nd}d| }z,| | jg| | ||g | |g ¡ W qR tk rŽ } zt |ƒ‚W 5 d }~X Y qRX qR| S ) Nz-cú.resú.rcZbrcc32z-foÚ z-Pú-o)Z_setup_compileÚappendÚextendr r ÚKeyErrorÚosÚpathÚnormpathÚmkpathÚdirnameÚspawnr r Ú _c_extensionsÚ_cpp_extensionsr )r ZsourcesÚ output_dirÚmacrosÚinclude_dirsÚdebugÚ extra_preargsÚextra_postargsZdependsÚobjectsÚpp_optsZbuildZcompile_optsÚobjÚsrcÚextÚmsgZ input_optZ output_optr r r ÚcompileQ sV ÿÿ ÿþþ zBCPPCompiler.compilec C sŽ | ||¡\}}| j||d}| ||¡r~|dg| }|r:z| | jg| ¡ W qŠ tk rz } zt|ƒ‚W 5 d }~X Y qŠX nt d|¡ d S )N)r. z/uúskipping %s (up-to-date)) Ú_fix_object_argsÚlibrary_filenameÚ _need_linkr+ r r r r r1 ) r r4 Zoutput_libnamer. r1 Útarget_langÚoutput_filenameZlib_argsr9 r r r Úcreate_static_lib’ s ÿzBCPPCompiler.create_static_libc C sè | ||¡\}}| |||¡\}}}|r8t dt|ƒ¡ |d k rNtj ||¡}| ||¡rØ|t j krŽd}| r~| jd d … }q´| jd d … }n&d}| r¦| j d d … }n| jd d … }|d krÂd}n‚tj |¡\}}tj |¡\}}tj |d ¡}tj |d| ¡}dg}|pg D ]}| d||f ¡ q| t||fd | ¡ ttjj|ƒ}|g}g }|D ]>}tj tj |¡¡\}}|d kr’| |¡ n | |¡ q`|D ]}| dtj |¡ ¡ q¤| d¡ | |¡ | d |g¡ | d¡ |D ]4}| ||| ¡}|d kr| |¡ n | |¡ qò| d¡ | d¡ | d |g¡ | d ¡ | |¡ | rp| |d d…<