Your IP : 3.145.106.176


Current Path : /opt/alt/python33/lib64/python3.3/distutils/__pycache__/
Upload File :
Current File : //opt/alt/python33/lib64/python3.3/distutils/__pycache__/ccompiler.cpython-33.pyo

�
��f¹c@s�dZddlZddlZddlZddlTddlmZddlmZddl	m
Z
ddlmZm
Z
ddlmZmZdd	lmZGd
d�d�Zdd
fddfdd
fddffZeedd�Zidddfd
6dddfd6dddfd6ddd fd!6d"d#d$fd%6d&d'd(fd6Zd)d*�Zeedddd+d,�Zd-d.�Zd/d0�ZdS(1u�distutils.ccompiler

Contains CCompiler, an abstract base class that defines the interface
for the Distutils compiler abstraction model.iN(u*(uspawn(u	move_file(umkpath(unewer_pairwiseunewer_group(usplit_quoteduexecute(ulogcBs�|EeZdZdZdtZdtZdtZdtZdtZ	dtZ
dtZdtZidd6dd6dd6dd6dd	6Z
dddgZd
d
d
dd�Zd
d�Zdd�Zdd�Zdd�Zdtdd�Zdd�Zdd�Zdd�Zdd�Zdd �Zd!d"�Zd#d$�Zd%d&�Zd'd(�Zd)d*�Zd+d,�Zd-d.�Z d/d0�Z!d1d2�Z"dtd3d4�Z#d5d6�Z$d7d8�Z%d9d:�Z&d;d<�Z'dtdtdtdtdtd=d>�Z(dtdtdtd
dtdtdtd?d@�Z)dAdB�Z*dtd
dtdCdD�Z+dEZ,dFZ-dGZ.dtdtdtdtdtd
dtdtdtdtdHdI�
Z/dtdtdtdtdtd
dtdtdtdtdJdK�
Z0dtdtdtdtdtd
dtdtdtdtdLdM�
Z1dtdtdtdtd
dtdtdtdNdO�Z2dPdQ�Z3dRdS�Z4dTdU�Z5dtdtdtdtdVdW�Z6d
dXdY�Z7d
dZd[d\�Z8d
dZd]d^�Z9d
dZd_d`�Z:dad
dZdbdc�Z;dddedf�Z<dgdh�Z=didj�Z>dtdddkdl�Z?dmdn�Z@dodp�ZAdqdrds�ZBdtS(uu	CCompileru�Abstract base class to define the interface that must be implemented
    by real compiler classes.  Also has some utility methods used by
    several compiler classes.

    The basic idea behind a compiler abstraction class is that each
    instance can be used for all the compile/link steps in building a
    single project.  Thus, attributes common to all of those compile and
    link steps -- include directories, macros to define, libraries to link
    against, etc. -- are attributes of the compiler instance.  To allow for
    variability in how individual files are treated, most of those
    attributes may be varied on a per-compilation or per-link basis.
    ucu.cuc++u.ccu.cppu.cxxuobjcu.micCs�||_||_||_d|_g|_g|_g|_g|_g|_	g|_
x.|jj�D]}|j
||j|�qjWdS(N(udry_runuforceuverboseuNoneu
output_dirumacrosuinclude_dirsu	librariesulibrary_dirsuruntime_library_dirsuobjectsuexecutablesukeysuset_executable(uselfuverboseudry_runuforceukey((u8/opt/alt/python33/lib64/python3.3/distutils/ccompiler.pyu__init__Us										uCCompiler.__init__cKsWxP|D]H}||jkr;td||jjf��n|j|||�qWdS(u�Define the executables (and options for them) that will be run
        to perform the various stages of compilation.  The exact set of
        executables that may be specified here depends on the compiler
        class (via the 'executables' class attribute), but most will have:
          compiler      the C/C++ compiler
          linker_so     linker used to create shared objects and libraries
          linker_exe    linker used to create binary executables
          archiver      static library creator

        On platforms with a command-line (Unix, DOS/Windows), each of these
        is a string that will be split into executable name and (optional)
        list of arguments.  (Splitting the string is done similarly to how
        Unix shells operate: words are delimited by spaces, but quotes and
        backslashes can override this.  See
        'distutils.util.split_quoted()'.)
        u$unknown executable '%s' for class %sN(uexecutablesu
ValueErroru	__class__u__name__uset_executable(uselfukwargsukey((u8/opt/alt/python33/lib64/python3.3/distutils/ccompiler.pyuset_executablesys

uCCompiler.set_executablescCs<t|t�r(t||t|��nt|||�dS(N(u
isinstanceustrusetattrusplit_quoted(uselfukeyuvalue((u8/opt/alt/python33/lib64/python3.3/distutils/ccompiler.pyuset_executable�suCCompiler.set_executablecCs<d}x/|jD]$}|d|kr*|S|d7}qWdS(Nii(umacrosuNone(uselfunameuiudefn((u8/opt/alt/python33/lib64/python3.3/distutils/ccompiler.pyu_find_macro�suCCompiler._find_macrocCs�x�|D]x}t|t�oat|�dkoat|dt�sQ|ddkoat|dt�std|dd��qqWdS(	u�Ensures that every element of 'definitions' is a valid macro
        definition, ie. either (name,value) 2-tuple or a (name,) tuple.  Do
        nothing if all definitions are OK, raise TypeError otherwise.
        iiiuinvalid macro definition '%s': u.must be tuple (string,), (string, string), or u(string, None)N(ii(u
isinstanceutupleulenustruNoneu	TypeError(uselfudefinitionsudefn((u8/opt/alt/python33/lib64/python3.3/distutils/ccompiler.pyu_check_macro_definitions�s
#u"CCompiler._check_macro_definitionscCsB|j|�}|dk	r(|j|=n|jj||f�dS(u_Define a preprocessor macro for all compilations driven by this
        compiler object.  The optional parameter 'value' should be a
        string; if it is not supplied, then the macro will be defined
        without an explicit value and the exact outcome depends on the
        compiler used (XXX true? does ANSI say anything about this?)
        N(u_find_macrouNoneumacrosuappend(uselfunameuvalueui((u8/opt/alt/python33/lib64/python3.3/distutils/ccompiler.pyudefine_macro�s	
uCCompiler.define_macrocCsE|j|�}|dk	r(|j|=n|f}|jj|�dS(u�Undefine a preprocessor macro for all compilations driven by
        this compiler object.  If the same macro is defined by
        'define_macro()' and undefined by 'undefine_macro()' the last call
        takes precedence (including multiple redefinitions or
        undefinitions).  If the macro is redefined/undefined on a
        per-compilation basis (ie. in the call to 'compile()'), then that
        takes precedence.
        N(u_find_macrouNoneumacrosuappend(uselfunameuiuundefn((u8/opt/alt/python33/lib64/python3.3/distutils/ccompiler.pyuundefine_macro�s

	uCCompiler.undefine_macrocCs|jj|�dS(u�Add 'dir' to the list of directories that will be searched for
        header files.  The compiler is instructed to search directories in
        the order in which they are supplied by successive calls to
        'add_include_dir()'.
        N(uinclude_dirsuappend(uselfudir((u8/opt/alt/python33/lib64/python3.3/distutils/ccompiler.pyuadd_include_dir�suCCompiler.add_include_dircCs|dd�|_dS(uySet the list of directories that will be searched to 'dirs' (a
        list of strings).  Overrides any preceding calls to
        'add_include_dir()'; subsequence calls to 'add_include_dir()' add
        to the list passed to 'set_include_dirs()'.  This does not affect
        any list of standard include directories that the compiler may
        search by default.
        N(uinclude_dirs(uselfudirs((u8/opt/alt/python33/lib64/python3.3/distutils/ccompiler.pyuset_include_dirs�suCCompiler.set_include_dirscCs|jj|�dS(u�Add 'libname' to the list of libraries that will be included in
        all links driven by this compiler object.  Note that 'libname'
        should *not* be the name of a file containing a library, but the
        name of the library itself: the actual filename will be inferred by
        the linker, the compiler, or the compiler class (depending on the
        platform).

        The linker will be instructed to link against libraries in the
        order they were supplied to 'add_library()' and/or
        'set_libraries()'.  It is perfectly valid to duplicate library
        names; the linker will be instructed to link against libraries as
        many times as they are mentioned.
        N(u	librariesuappend(uselfulibname((u8/opt/alt/python33/lib64/python3.3/distutils/ccompiler.pyuadd_library�suCCompiler.add_librarycCs|dd�|_dS(u�Set the list of libraries to be included in all links driven by
        this compiler object to 'libnames' (a list of strings).  This does
        not affect any standard system libraries that the linker may
        include by default.
        N(u	libraries(uselfulibnames((u8/opt/alt/python33/lib64/python3.3/distutils/ccompiler.pyu
set_libraries�suCCompiler.set_librariescCs|jj|�dS(u'Add 'dir' to the list of directories that will be searched for
        libraries specified to 'add_library()' and 'set_libraries()'.  The
        linker will be instructed to search for libraries in the order they
        are supplied to 'add_library_dir()' and/or 'set_library_dirs()'.
        N(ulibrary_dirsuappend(uselfudir((u8/opt/alt/python33/lib64/python3.3/distutils/ccompiler.pyuadd_library_dirsuCCompiler.add_library_dircCs|dd�|_dS(u�Set the list of library search directories to 'dirs' (a list of
        strings).  This does not affect any standard library search path
        that the linker may search by default.
        N(ulibrary_dirs(uselfudirs((u8/opt/alt/python33/lib64/python3.3/distutils/ccompiler.pyuset_library_dirssuCCompiler.set_library_dirscCs|jj|�dS(ulAdd 'dir' to the list of directories that will be searched for
        shared libraries at runtime.
        N(uruntime_library_dirsuappend(uselfudir((u8/opt/alt/python33/lib64/python3.3/distutils/ccompiler.pyuadd_runtime_library_dirsu!CCompiler.add_runtime_library_dircCs|dd�|_dS(u�Set the list of directories to search for shared libraries at
        runtime to 'dirs' (a list of strings).  This does not affect any
        standard search path that the runtime linker may search by
        default.
        N(uruntime_library_dirs(uselfudirs((u8/opt/alt/python33/lib64/python3.3/distutils/ccompiler.pyuset_runtime_library_dirssu"CCompiler.set_runtime_library_dirscCs|jj|�dS(u�Add 'object' to the list of object files (or analogues, such as
        explicitly named library files or the output of "resource
        compilers") to be included in every link driven by this compiler
        object.
        N(uobjectsuappend(uselfuobject((u8/opt/alt/python33/lib64/python3.3/distutils/ccompiler.pyuadd_link_object suCCompiler.add_link_objectcCs|dd�|_dS(u�Set the list of object files (or analogues) to be included in
        every link to 'objects'.  This does not affect any standard object
        files that the linker may include by default (such as system
        libraries).
        N(uobjects(uselfuobjects((u8/opt/alt/python33/lib64/python3.3/distutils/ccompiler.pyuset_link_objects(suCCompiler.set_link_objectscCs�|dkr|j}nt|t�s6td��n|dkrN|j}n1t|t�rs||jplg}ntd��|dkr�|j}n=t|ttf�r�t|�|jp�g}ntd��|dkr�g}n|j	|ddd|�}t
||�}i}	xmtt|��D]Y}
||
}||
}t
jj|�d}
|jt
jj|��||
f|	|<q,W|||||	fS(	u;Process arguments and decide which source files to compile.u%'output_dir' must be a string or Noneu/'macros' (if supplied) must be a list of tuplesu6'include_dirs' (if supplied) must be a list of stringsu	strip_diriu
output_diriN(uNoneu
output_diru
isinstanceustru	TypeErrorumacrosulistuinclude_dirsutupleuobject_filenamesugen_preprocess_optionsurangeulenuosupathusplitextumkpathudirname(uselfuoutdirumacrosuincdirsusourcesudependsuextrauobjectsupp_optsubuilduiusrcuobjuext((u8/opt/alt/python33/lib64/python3.3/distutils/ccompiler.pyu_setup_compile6s8			

uCCompiler._setup_compilecCsF|dg}|r)dg|dd�<n|rB||dd�<n|S(Nu-cu-gi((uselfupp_optsudebugubeforeucc_args((u8/opt/alt/python33/lib64/python3.3/distutils/ccompiler.pyu_get_cc_argsas
uCCompiler._get_cc_argscCs�|dkr|j}nt|t�s6td��n|dkrN|j}n1t|t�rs||jplg}ntd��|dkr�|j}n=t|ttf�r�t|�|jp�g}ntd��|||fS(u'Typecheck and fix-up some of the arguments to the 'compile()'
        method, and return fixed-up values.  Specifically: if 'output_dir'
        is None, replaces it with 'self.output_dir'; ensures that 'macros'
        is a list, and augments it with 'self.macros'; ensures that
        'include_dirs' is a list, and augments it with 'self.include_dirs'.
        Guarantees that the returned values are of the correct type,
        i.e. for 'output_dir' either string or None, and for 'macros' and
        'include_dirs' either list or None.
        u%'output_dir' must be a string or Noneu/'macros' (if supplied) must be a list of tuplesu6'include_dirs' (if supplied) must be a list of stringsN(	uNoneu
output_diru
isinstanceustru	TypeErrorumacrosulistuinclude_dirsutuple(uselfu
output_dirumacrosuinclude_dirs((u8/opt/alt/python33/lib64/python3.3/distutils/ccompiler.pyu_fix_compile_argsjs 
	uCCompiler._fix_compile_argscCs|j|d|�}|ifS(u+Decide which souce files must be recompiled.

        Determine the list of object files corresponding to 'sources',
        and figure out which ones really need to be recompiled.
        Return a list of all object files and a dictionary telling
        which source files can be skipped.
        u
output_dir(uobject_filenames(uselfusourcesu
output_dirudependsuobjects((u8/opt/alt/python33/lib64/python3.3/distutils/ccompiler.pyu
_prep_compile�s	uCCompiler._prep_compilecCspt|ttf�s$td��nt|�}|dkrH|j}nt|t�sftd��n||fS(u�Typecheck and fix up some arguments supplied to various methods.
        Specifically: ensure that 'objects' is a list; if output_dir is
        None, replace with self.output_dir.  Return fixed versions of
        'objects' and 'output_dir'.
        u,'objects' must be a list or tuple of stringsu%'output_dir' must be a string or NoneN(u
isinstanceulistutupleu	TypeErroruNoneu
output_dirustr(uselfuobjectsu
output_dir((u8/opt/alt/python33/lib64/python3.3/distutils/ccompiler.pyu_fix_object_args�suCCompiler._fix_object_argscCs|dkr|j}n=t|ttf�rIt|�|jpBg}ntd��|dkrm|j}n=t|ttf�r�t|�|jp�g}ntd��|dkr�|j}n=t|ttf�r�t|�|jp�g}ntd��|||fS(u;Typecheck and fix up some of the arguments supplied to the
        'link_*' methods.  Specifically: ensure that all arguments are
        lists, and augment them with their permanent versions
        (eg. 'self.libraries' augments 'libraries').  Return a tuple with
        fixed versions of all arguments.
        u3'libraries' (if supplied) must be a list of stringsu6'library_dirs' (if supplied) must be a list of stringsu>'runtime_library_dirs' (if supplied) must be a list of stringsN(uNoneu	librariesu
isinstanceulistutupleu	TypeErrorulibrary_dirsuruntime_library_dirs(uselfu	librariesulibrary_dirsuruntime_library_dirs((u8/opt/alt/python33/lib64/python3.3/distutils/ccompiler.pyu
_fix_lib_args�s&			uCCompiler._fix_lib_argscCsE|jr
dS|jr.t||dd�}nt||�}|SdS(ujReturn true if we need to relink the files listed in 'objects'
        to recreate 'output_file'.
        umissingunewerNT(uforceuTrueudry_rununewer_group(uselfuobjectsuoutput_fileunewer((u8/opt/alt/python33/lib64/python3.3/distutils/ccompiler.pyu
_need_link�s		uCCompiler._need_linkc	Cs�t|t�s|g}nd}t|j�}x~|D]v}tjj|�\}}|jj	|�}y1|jj
|�}||kr�|}|}nWq7tk
r�Yq7Xq7W|S(u|Detect the language of a given file, or list of files. Uses
        language_map, and language_order to do the job.
        N(u
isinstanceulistuNoneulenulanguage_orderuosupathusplitextulanguage_mapugetuindexu
ValueError(	uselfusourcesulanguindexusourceubaseuextuextlanguextindex((u8/opt/alt/python33/lib64/python3.3/distutils/ccompiler.pyudetect_language�s


	uCCompiler.detect_languagecCsdS(u�Preprocess a single C/C++ source file, named in 'source'.
        Output will be written to file named 'output_file', or stdout if
        'output_file' not supplied.  'macros' is a list of macro
        definitions as for 'compile()', which will augment the macros set
        with 'define_macro()' and 'undefine_macro()'.  'include_dirs' is a
        list of directory names that will be added to the default list.

        Raises PreprocessError on failure.
        N((uselfusourceuoutput_fileumacrosuinclude_dirsu
extra_preargsuextra_postargs((u8/opt/alt/python33/lib64/python3.3/distutils/ccompiler.pyu
preprocess�suCCompiler.preprocessc	Cs�|j||||||�\}}	}}
}|j|
||�}xV|	D]N}
y||
\}}Wntk
rzwIYnX|j|
|||||
�qIW|	S(uK	Compile one or more source files.

        'sources' must be a list of filenames, most likely C/C++
        files, but in reality anything that can be handled by a
        particular compiler and compiler class (eg. MSVCCompiler can
        handle resource files in 'sources').  Return a list of object
        filenames, one per source filename in 'sources'.  Depending on
        the implementation, not all source files will necessarily be
        compiled, but all corresponding object filenames will be
        returned.

        If 'output_dir' is given, object files will be put under it, while
        retaining their original path component.  That is, "foo/bar.c"
        normally compiles to "foo/bar.o" (for a Unix implementation); if
        'output_dir' is "build", then it would compile to
        "build/foo/bar.o".

        'macros', if given, must be a list of macro definitions.  A macro
        definition is either a (name, value) 2-tuple or a (name,) 1-tuple.
        The former defines a macro; if the value is None, the macro is
        defined without an explicit value.  The 1-tuple case undefines a
        macro.  Later definitions/redefinitions/ undefinitions take
        precedence.

        'include_dirs', if given, must be a list of strings, the
        directories to add to the default include file search path for this
        compilation only.

        'debug' is a boolean; if true, the compiler will be instructed to
        output debug symbols in (or alongside) the object file(s).

        'extra_preargs' and 'extra_postargs' are implementation- dependent.
        On platforms that have the notion of a command-line (e.g. Unix,
        DOS/Windows), they are most likely lists of strings: extra
        command-line arguments to prepand/append to the compiler command
        line.  On other platforms, consult the implementation class
        documentation.  In any event, they are intended as an escape hatch
        for those occasions when the abstract compiler framework doesn't
        cut the mustard.

        'depends', if given, is a list of filenames that all targets
        depend on.  If a source file is older than any file in
        depends, then the source file will be recompiled.  This
        supports dependency tracking, but only at a coarse
        granularity.

        Raises CompileError on failure.
        (u_setup_compileu_get_cc_argsuKeyErroru_compile(uselfusourcesu
output_dirumacrosuinclude_dirsudebugu
extra_preargsuextra_postargsudependsuobjectsupp_optsubuilducc_argsuobjusrcuext((u8/opt/alt/python33/lib64/python3.3/distutils/ccompiler.pyucompile�s6

 uCCompiler.compilecCsdS(uCompile 'src' to product 'obj'.N((uselfuobjusrcuextucc_argsuextra_postargsupp_opts((u8/opt/alt/python33/lib64/python3.3/distutils/ccompiler.pyu_compileCsuCCompiler._compilecCsdS(u&Link a bunch of stuff together to create a static library file.
        The "bunch of stuff" consists of the list of object files supplied
        as 'objects', the extra object files supplied to
        'add_link_object()' and/or 'set_link_objects()', the libraries
        supplied to 'add_library()' and/or 'set_libraries()', and the
        libraries supplied as 'libraries' (if any).

        'output_libname' should be a library name, not a filename; the
        filename will be inferred from the library name.  'output_dir' is
        the directory where the library file will be put.

        'debug' is a boolean; if true, debugging information will be
        included in the library (note that on most platforms, it is the
        compile step where this matters: the 'debug' flag is included here
        just for consistency).

        'target_lang' is the target language for which the given objects
        are being compiled. This allows specific linkage time treatment of
        certain languages.

        Raises LibError on failure.
        N((uselfuobjectsuoutput_libnameu
output_dirudebugutarget_lang((u8/opt/alt/python33/lib64/python3.3/distutils/ccompiler.pyucreate_static_libIsuCCompiler.create_static_libu
shared_objectushared_libraryu
executablecCs
t�dS(uuLink a bunch of stuff together to create an executable or
        shared library file.

        The "bunch of stuff" consists of the list of object files supplied
        as 'objects'.  'output_filename' should be a filename.  If
        'output_dir' is supplied, 'output_filename' is relative to it
        (i.e. 'output_filename' can provide directory components if
        needed).

        'libraries' is a list of libraries to link against.  These are
        library names, not filenames, since they're translated into
        filenames in a platform-specific way (eg. "foo" becomes "libfoo.a"
        on Unix and "foo.lib" on DOS/Windows).  However, they can include a
        directory component, which means the linker will look in that
        specific directory rather than searching all the normal locations.

        'library_dirs', if supplied, should be a list of directories to
        search for libraries that were specified as bare library names
        (ie. no directory component).  These are on top of the system
        default and those supplied to 'add_library_dir()' and/or
        'set_library_dirs()'.  'runtime_library_dirs' is a list of
        directories that will be embedded into the shared library and used
        to search for other shared libraries that *it* depends on at
        run-time.  (This may only be relevant on Unix.)

        'export_symbols' is a list of symbols that the shared library will
        export.  (This appears to be relevant only on Windows.)

        'debug' is as for 'compile()' and 'create_static_lib()', with the
        slight distinction that it actually matters on most platforms (as
        opposed to 'create_static_lib()', which includes a 'debug' flag
        mostly for form's sake).

        'extra_preargs' and 'extra_postargs' are as for 'compile()' (except
        of course that they supply command-line arguments for the
        particular linker being used).

        'target_lang' is the target language for which the given objects
        are being compiled. This allows specific linkage time treatment of
        certain languages.

        Raises LinkError on failure.
        N(uNotImplementedError(uselfutarget_descuobjectsuoutput_filenameu
output_diru	librariesulibrary_dirsuruntime_library_dirsuexport_symbolsudebugu
extra_preargsuextra_postargsu
build_temputarget_lang((u8/opt/alt/python33/lib64/python3.3/distutils/ccompiler.pyulinkis9uCCompiler.linkc

CsG|jtj||j|dd�|||||||	|
||�
dS(Nulib_typeushared(ulinku	CCompileruSHARED_LIBRARYulibrary_filename(
uselfuobjectsuoutput_libnameu
output_diru	librariesulibrary_dirsuruntime_library_dirsuexport_symbolsudebugu
extra_preargsuextra_postargsu
build_temputarget_lang((u8/opt/alt/python33/lib64/python3.3/distutils/ccompiler.pyulink_shared_lib�s
	uCCompiler.link_shared_libc

Cs8|jtj|||||||||	|
||�
dS(N(ulinku	CCompileru
SHARED_OBJECT(
uselfuobjectsuoutput_filenameu
output_diru	librariesulibrary_dirsuruntime_library_dirsuexport_symbolsudebugu
extra_preargsuextra_postargsu
build_temputarget_lang((u8/opt/alt/python33/lib64/python3.3/distutils/ccompiler.pyulink_shared_object�s

	uCCompiler.link_shared_objectcCsA|jtj||j|�||||d|||	d|
�
dS(N(ulinku	CCompileru
EXECUTABLEuexecutable_filenameuNone(uselfuobjectsuoutput_prognameu
output_diru	librariesulibrary_dirsuruntime_library_dirsudebugu
extra_preargsuextra_postargsutarget_lang((u8/opt/alt/python33/lib64/python3.3/distutils/ccompiler.pyulink_executable�suCCompiler.link_executablecCs
t�dS(ukReturn the compiler option to add 'dir' to the list of
        directories searched for libraries.
        N(uNotImplementedError(uselfudir((u8/opt/alt/python33/lib64/python3.3/distutils/ccompiler.pyulibrary_dir_option�suCCompiler.library_dir_optioncCs
t�dS(usReturn the compiler option to add 'dir' to the list of
        directories searched for runtime libraries.
        N(uNotImplementedError(uselfudir((u8/opt/alt/python33/lib64/python3.3/distutils/ccompiler.pyuruntime_library_dir_option�su$CCompiler.runtime_library_dir_optioncCs
t�dS(uReturn the compiler option to add 'dir' to the list of libraries
        linked into the shared library or executable.
        N(uNotImplementedError(uselfulib((u8/opt/alt/python33/lib64/python3.3/distutils/ccompiler.pyulibrary_option�suCCompiler.library_optioncCsMddl}|dkr!g}n|dkr6g}n|dkrKg}n|dkr`g}n|jd|dd�\}}tj|d�}	z7x|D]}
|	jd|
�q�W|	jd|�Wd|	j�Xy|j|gd|�}Wnt	k
r	d
SYnXy |j|d	d
|d|�Wntt
fk
rHd
SYnXdS(u�Return a boolean indicating whether funcname is supported on
        the current platform.  The optional arguments can be used to
        augment the compilation environment.
        iNu.cutextuwu#include "%s"
u+main (int argc, char **argv) {
    %s();
}
uinclude_dirsua.outu	librariesulibrary_dirsTF(utempfileuNoneumkstempuTrueuosufdopenuwriteucloseucompileuCompileErroruFalseulink_executableu	LinkErroru	TypeError(uselfufuncnameuincludesuinclude_dirsu	librariesulibrary_dirsutempfileufdufnameufuincluobjects((u8/opt/alt/python33/lib64/python3.3/distutils/ccompiler.pyuhas_function�s8					

		uCCompiler.has_functioncCs
t�dS(uHSearch the specified list of directories for a static or shared
        library file 'lib' and return the full path to that file.  If
        'debug' true, look for a debugging version (if that makes sense on
        the current platform).  Return None if 'lib' wasn't found in any of
        the specified directories.
        N(uNotImplementedError(uselfudirsulibudebug((u8/opt/alt/python33/lib64/python3.3/distutils/ccompiler.pyufind_library_file#suCCompiler.find_library_fileucCs�|dkrd}ng}x�|D]�}tjj|�\}}tjj|�d}|tjj|�d�}||jkr�td||f��n|r�tjj|�}n|j	tjj
|||j��q"W|S(Nuiu"unknown file type '%s' (from '%s')(uNoneuosupathusplitextu
splitdriveuisabsusrc_extensionsuUnknownFileErrorubasenameuappendujoinu
obj_extension(uselfusource_filenamesu	strip_diru
output_diru	obj_namesusrc_nameubaseuext((u8/opt/alt/python33/lib64/python3.3/distutils/ccompiler.pyuobject_filenamesNs	
uCCompiler.object_filenamescCs5|rtjj|�}ntjj|||j�S(N(uosupathubasenameujoinushared_lib_extension(uselfubasenameu	strip_diru
output_dir((u8/opt/alt/python33/lib64/python3.3/distutils/ccompiler.pyushared_object_filename_su CCompiler.shared_object_filenamecCs;|rtjj|�}ntjj|||jp6d�S(Nu(uosupathubasenameujoinu
exe_extension(uselfubasenameu	strip_diru
output_dir((u8/opt/alt/python33/lib64/python3.3/distutils/ccompiler.pyuexecutable_filenameesuCCompiler.executable_filenameustaticc
Cs�|dkrtd��nt||d�}t||d�}tjj|�\}}|||f}	|rxd}ntjj|||	�S(	Nustaticusharedudylibu0'lib_type' must be "static", "shared" or "dylib"u_lib_formatu_lib_extensionu(ustaticusharedudylib(u
ValueErrorugetattruosupathusplitujoin(
uselfulibnameulib_typeu	strip_diru
output_dirufmtuextudirubaseufilename((u8/opt/alt/python33/lib64/python3.3/distutils/ccompiler.pyulibrary_filenameks	uCCompiler.library_filenameicCstj|�dS(N(ulogudebug(uselfumsgulevel((u8/opt/alt/python33/lib64/python3.3/distutils/ccompiler.pyuannounce~suCCompiler.announcecCs'ddlm}|r#t|�ndS(Ni(uDEBUG(udistutils.debuguDEBUGuprint(uselfumsguDEBUG((u8/opt/alt/python33/lib64/python3.3/distutils/ccompiler.pyudebug_print�suCCompiler.debug_printcCstjjd|�dS(Nuwarning: %s
(usysustderruwrite(uselfumsg((u8/opt/alt/python33/lib64/python3.3/distutils/ccompiler.pyuwarn�suCCompiler.warncCst||||j�dS(N(uexecuteudry_run(uselfufuncuargsumsgulevel((u8/opt/alt/python33/lib64/python3.3/distutils/ccompiler.pyuexecute�suCCompiler.executecCst|d|j�dS(Nudry_run(uspawnudry_run(uselfucmd((u8/opt/alt/python33/lib64/python3.3/distutils/ccompiler.pyuspawn�suCCompiler.spawncCst||d|j�S(Nudry_run(u	move_fileudry_run(uselfusrcudst((u8/opt/alt/python33/lib64/python3.3/distutils/ccompiler.pyu	move_file�suCCompiler.move_filei�cCst||d|j�dS(Nudry_run(umkpathudry_run(uselfunameumode((u8/opt/alt/python33/lib64/python3.3/distutils/ccompiler.pyumkpath�suCCompiler.mkpathN(Cu__name__u
__module__u__qualname__u__doc__uNoneu
compiler_typeusrc_extensionsu
obj_extensionustatic_lib_extensionushared_lib_extensionustatic_lib_formatushared_lib_formatu
exe_extensionulanguage_mapulanguage_orderu__init__uset_executablesuset_executableu_find_macrou_check_macro_definitionsudefine_macrouundefine_macrouadd_include_diruset_include_dirsuadd_libraryu
set_librariesuadd_library_diruset_library_dirsuadd_runtime_library_diruset_runtime_library_dirsuadd_link_objectuset_link_objectsu_setup_compileu_get_cc_argsu_fix_compile_argsu
_prep_compileu_fix_object_argsu
_fix_lib_argsu
_need_linkudetect_languageu
preprocessucompileu_compileucreate_static_libu
SHARED_OBJECTuSHARED_LIBRARYu
EXECUTABLEulinkulink_shared_libulink_shared_objectulink_executableulibrary_dir_optionuruntime_library_dir_optionulibrary_optionuhas_functionufind_library_fileuobject_filenamesushared_object_filenameuexecutable_filenameulibrary_filenameuannounceudebug_printuwarnuexecuteuspawnu	move_fileumkpath(u
__locals__((u8/opt/alt/python33/lib64/python3.3/distutils/ccompiler.pyu	CCompilers�


$ 
+	 "
	B4*+u	CCompilerucygwin.*uunixuos2emxuemxuposixuntumsvccCs|dkrtj}n|dkr0tj}nxHtD]@\}}tj||�dk	sstj||�dk	r7|Sq7WdS(ukDetermine the default compiler to use for the given platform.

       osname should be one of the standard Python OS names (i.e. the
       ones returned by os.name) and platform the common value
       returned by sys.platform for the platform in question.

       The default values are os.name and sys.platform in case the
       parameters are not given.
    uunixN(uNoneuosunameusysuplatformu_default_compilersureumatch(uosnameuplatformupatternucompiler((u8/opt/alt/python33/lib64/python3.3/distutils/ccompiler.pyuget_default_compiler�s
uget_default_compileru
unixccompileru
UnixCCompilerustandard UNIX-style compilerumsvccompileruMSVCCompileruMicrosoft Visual C++ucygwinccompileruCygwinCCompileru'Cygwin port of GNU C Compiler for Win32ucygwinuMingw32CCompileru(Mingw32 port of GNU C Compiler for Win32umingw32ubcppcompileruBCPPCompileruBorland C++ CompilerubcppuemxccompileruEMXCCompileru#EMX port of GNU C Compiler for OS/2cCsvddlm}g}x6tj�D](}|jd|dt|df�q#W|j�||�}|jd�dS(uyPrint list of available compilers (used by the "--help-compiler"
    options to "build", "build_ext", "build_clib").
    i(uFancyGetoptu	compiler=iuList of available compilers:N(udistutils.fancy_getoptuFancyGetoptucompiler_classukeysuappenduNoneusortu
print_help(uFancyGetoptu	compilersucompilerupretty_printer((u8/opt/alt/python33/lib64/python3.3/distutils/ccompiler.pyushow_compilers�s
ushow_compilerscCs#|dkrtj}ny2|dkr6t|�}nt|\}}}WnEtk
r�d|}|dk	r�|d|}nt|��YnXy5d|}t|�tj	|}	t
|	�|}
WnItk
r�td|��Yn(tk
rtd||f��YnX|
d||�S(u[Generate an instance of some CCompiler subclass for the supplied
    platform/compiler combination.  'plat' defaults to 'os.name'
    (eg. 'posix', 'nt'), and 'compiler' defaults to the default compiler
    for that platform.  Currently only 'posix' and 'nt' are supported, and
    the default compilers are "traditional Unix interface" (UnixCCompiler
    class) and Visual C++ (MSVCCompiler class).  Note that it's perfectly
    possible to ask for a Unix compiler object under Windows, and a
    Microsoft compiler object under Unix -- if you supply a value for
    'compiler', 'plat' is ignored.
    u5don't know how to compile C/C++ code on platform '%s'u with '%s' compileru
distutils.u4can't compile C/C++ code: unable to load module '%s'uBcan't compile C/C++ code: unable to find class '%s' in module '%s'N(
uNoneuosunameuget_default_compilerucompiler_classuKeyErroruDistutilsPlatformErroru
__import__usysumodulesuvarsuImportErroruDistutilsModuleError(uplatucompileruverboseudry_runuforceumodule_nameu
class_nameulong_descriptionumsgumoduleuklass((u8/opt/alt/python33/lib64/python3.3/distutils/ccompiler.pyunew_compiler�s2






unew_compilercCs�g}x�|D]�}t|t�oAdt|�ko?dknsWtd|��nt|�dkr�|jd|d�q
t|�dkr
|dd	kr�|jd|d�q�|jd|�q
q
Wx|D]}|jd|�q�W|S(
uGenerate C pre-processor options (-D, -U, -I) as used by at least
    two types of compilers: the typical Unix compiler and Visual C++.
    'macros' is the usual thing, a list of 1- or 2-tuples, where (name,)
    means undefine (-U) macro 'name', and (name,value) means define (-D)
    macro 'name' to 'value'.  'include_dirs' is just a list of directory
    names to be added to the header file search path (-I).  Returns a list
    of command-line options suitable for either Unix compilers or Visual
    C++.
    iiuPbad macro definition '%s': each element of 'macros' list must be a 1- or 2-tupleu-U%siu-D%su-D%s=%su-I%sN(u
isinstanceutupleulenu	TypeErroruappenduNone(umacrosuinclude_dirsupp_optsumacroudir((u8/opt/alt/python33/lib64/python3.3/distutils/ccompiler.pyugen_preprocess_options
s
1

ugen_preprocess_optionscCs�g}x$|D]}|j|j|��q
WxF|D]>}|j|�}t|t�re||}q4|j|�q4Wx�|D]y}tjj|�\}}	|r�|j|g|	�}
|
r�|j|
�q�|j	d|�q}|j|j
|��q}W|S(ucGenerate linker options for searching library directories and
    linking with specific libraries.  'libraries' and 'library_dirs' are,
    respectively, lists of library names (not filenames!) and search
    directories.  Returns a list of command-line options suitable for use
    with some compiler (depending on the two format strings passed in).
    u6no library file corresponding to '%s' found (skipping)(uappendulibrary_dir_optionuruntime_library_dir_optionu
isinstanceulistuosupathusplitufind_library_fileuwarnulibrary_option(ucompilerulibrary_dirsuruntime_library_dirsu	librariesulib_optsudiruoptulibulib_dirulib_nameulib_file((u8/opt/alt/python33/lib64/python3.3/distutils/ccompiler.pyugen_lib_options:s$



	ugen_lib_options(u__doc__usysuosureudistutils.errorsudistutils.spawnuspawnudistutils.file_utilu	move_fileudistutils.dir_utilumkpathudistutils.dep_utilunewer_pairwiseunewer_groupudistutils.utilusplit_quoteduexecuteu	distutilsulogu	CCompileru_default_compilersuNoneuget_default_compilerucompiler_classushow_compilersunew_compilerugen_preprocess_optionsugen_lib_options(((u8/opt/alt/python33/lib64/python3.3/distutils/ccompiler.pyu<module>sB$
����				





--

?>