관리-도구
편집 파일: bcppcompiler.cpython-33.pyc
� ��fW: c @ s� d Z d d l Z d d l m Z m Z m Z m Z m Z m Z d d l m Z m Z m Z d d l m Z d d l m Z d d l m Z Gd d � d e � Z d S( u� distutils.bcppcompiler Contains BorlandCCompiler, an implementation of the abstract CCompiler class for the Borland C++ compiler. i N( u DistutilsExecErroru DistutilsPlatformErroru CompileErroru LibErroru LinkErroru UnknownFileError( u CCompileru gen_preprocess_optionsu gen_lib_options( u write_file( u newer( u logc B s | Ee Z d Z d Z d Z i Z d g Z d d d g Z e e Z d Z d Z d Z d Z Z d Z d d d d d � Z d d d d d d d d d � Z d d d d d � Z d d d d d d d d d d d d � Z d d d � Z d d d d � Z d d d d d d d � Z d S( u BCPPCompileru Concrete class that implements an interface to the Borland C/C++ compiler, as defined by the CCompiler abstract class. u bcppu .cu .ccu .cppu .cxxu .obju .libu .dllu %s%su .exei c C s� t j | | | | � d | _ d | _ d | _ d | _ d d d d g | _ d d d d g | _ d d d d g | _ d d d d g | _ g | _ d d d g | _ d d d d g | _ d S( Nu bcc32.exeu ilink32.exeu tlib.exeu /tWMu /O2u /qu /g0u /Odu /Tpdu /Gnu /xu /r( u CCompileru __init__u ccu linkeru libu Noneu preprocess_optionsu compile_optionsu compile_options_debugu ldflags_sharedu ldflags_shared_debugu ldflags_staticu ldflags_exeu ldflags_exe_debug( u selfu verboseu dry_runu force( ( u; /opt/alt/python33/lib64/python3.3/distutils/bcppcompiler.pyu __init__5 s u BCPPCompiler.__init__c C s | j | | | | | | � \ } } } } } | p6 g } | j d � | r_ | j | j � n | j | j � x�| D]�} y | | \ } } Wn t k r� wv Yn Xt j j | � } t j j | � } | j t j j | � � | d k r� qv n | d k rZy | j d d | | g � Wqv t k rS} z t | � � WYd d } ~ Xqv Xqv n | | j k rrd } n | | j k r�d } n d } d | } y4 | j | j g | | | | g | | g � Wqv t k r} z t | � � WYd d } ~ Xqv Xqv W| S( Nu -cu .resu .rcu brcc32u -fou u -Pu -o( u _setup_compileu appendu extendu compile_options_debugu compile_optionsu KeyErroru osu pathu normpathu mkpathu dirnameu spawnu DistutilsExecErroru CompileErroru _c_extensionsu _cpp_extensionsu cc( u selfu sourcesu output_diru macrosu include_dirsu debugu extra_preargsu extra_postargsu dependsu objectsu pp_optsu buildu compile_optsu obju srcu extu msgu input_optu output_opt( ( u; /opt/alt/python33/lib64/python3.3/distutils/bcppcompiler.pyu compileQ sF .#u BCPPCompiler.compilec C s� | j | | � \ } } | j | d | �} | j | | � r� | d g | } | rX n y | j | j g | � Wq� t k r� } z t | � � WYd d } ~ Xq� Xn t j d | � d S( Nu output_diru /uu skipping %s (up-to-date)( u _fix_object_argsu library_filenameu _need_linku spawnu libu DistutilsExecErroru LibErroru logu debug( u selfu objectsu output_libnameu output_diru debugu target_langu output_filenameu lib_argsu msg( ( u; /opt/alt/python33/lib64/python3.3/distutils/bcppcompiler.pyu create_static_lib� s "u BCPPCompiler.create_static_libc C s� | j | | � \ } } | j | | | � \ } } } | rU t j d t | � � n | d k ry t j j | | � } n | j | | � r�| t j k r� d } | r� | j d d � } q| j d d � } n5 d } | r� | j d d � } n | j d d � } | d k rd } n� t j j | � \ } } t j j | � \ } } t j j | d � } t j j | d | � } d g } x+ | p�g D] } | j d | | f � q�W| j t | | f d | � t t j j | � } | g } g } x[ | D]S } t j j t j j | � � \ } } | d k r@| j | � q�| j | � q�Wx+ | D]# } | j d t j j | � � qXW| j d � | j | � | j d | g � | j d � xL | D]D } | j | | | � } | d k r�| j | � q�| j | � q�W| j d � | j d � | j d | g � | j d � | j | � | rh| | d d � <n | r~| j | � n | j t j j | � � y | j | j g | � Wq�t k r�} z t | � � WYd d } ~ Xq�Xn t j d | � d S( Nu7 I don't know what to do with 'runtime_library_dirs': %su c0w32u c0d32u i u %s.defu EXPORTSu %s=_%su writing %su .resu /L%su /L.u ,u ,,u import32u cw32mtu skipping %s (up-to-date)(! u _fix_object_argsu _fix_lib_argsu logu warnu stru Noneu osu pathu joinu _need_linku CCompileru EXECUTABLEu ldflags_exe_debugu ldflags_exeu ldflags_shared_debugu ldflags_sharedu splitu splitextu dirnameu appendu executeu write_fileu mapu normpathu normcaseu extendu find_library_fileu mkpathu spawnu linkeru DistutilsExecErroru LinkErroru debug( u selfu target_descu objectsu output_filenameu output_diru librariesu library_dirsu runtime_library_dirsu export_symbolsu debugu extra_preargsu extra_postargsu build_tempu target_langu startup_obju ld_argsu def_fileu headu tailu modnameu extu temp_diru contentsu symu objects2u resourcesu fileu baseu lu libu libfileu msg( ( u; /opt/alt/python33/lib64/python3.3/distutils/bcppcompiler.pyu link� s| $ ! "u BCPPCompiler.linkc C s� | r- | d } | d | d | | f } n | d | f } xW | D]K } xB | D]: } t j j | | j | � � } t j j | � rQ | SqQ WqD Wd Sd S( Nu _du _bcpp( u osu pathu joinu library_filenameu existsu None( u selfu dirsu libu debugu dlibu try_namesu diru nameu libfile( ( u; /opt/alt/python33/lib64/python3.3/distutils/bcppcompiler.pyu find_library_file4 s u BCPPCompiler.find_library_fileu c C s" | d k r d } n g } x | D]� } t j j t j j | � � \ } } | | j d d g k r~ t d | | f � � n | r� t j j | � } n | d k r� | j t j j | | | � � q"