%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /proc/self/root/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/
Upload File :
Create Path :
Current File : //proc/self/root/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/ccompiler.pyc

�
�9Zc	@`s�ddlmZmZmZddlZddlZddlZddlZddlmZddl	m
Z
ddlTddlm
Z
mZmZddlmZddlmZdd	lmZdd
lmZddlmZddlmZmZmZmZmZd
�Z dd�Z"e e#de"�ddd�Z$e e#de$�dddddddd�Z%e e#de%�dPd�Z&e e#de&�d�Z'd�Z(e e#de(�dd�Z)e e#de)�dddd�Z*e+dgd�Z,e e#de,�d �Z-e e#d!e-�dQe.d%<dRe.d(<dSe.d+<dTe.d.<dUe.d1<dVe.d5<e
j/dWdXdYdZd[d\f7_/ej0d8kr�d]e.d<<e�r�ej1d=�d_e
j/e
_/q�ne2Z3dddddd>�Z2e2e
_2e4Z5d?�Z4e4e
_4x\d@dAdBdCdDdEdFgD]?Z6ej7j8dGe6dH�Z9e9dk	r e:e9dIe4�q q We;Z<dJ�Z;e;e
_;ddl=Z=ej>dKe=j?�Z@ej>dL�ZAej>dM�ZBej>dN�ZCdO�ZDeDe
_DdS(`i(tdivisiontabsolute_importtprint_functionN(tcopy(t	ccompiler(t*(tDistutilsExecErrortDistutilsModuleErrortDistutilsPlatformError(tcustomize_compiler(tLooseVersion(tlog(t
get_exception(texec_command(t	cyg2win32tis_sequencetmingw32t
quote_argstget_num_build_jobsc`sNtjddkr+tj�d|�}n�fd�}t|||�dS(Niic`s�|||�S(N((tselftargstkw(tfunc(sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/ccompiler.pyt<lambda>s(tsystversion_infottypest
MethodTypetNonetsetattr(tklasstmethod_nameRtm((RsL/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/ccompiler.pytreplace_methodscC`s�|dkr9|}t|�r9djt|��}q9ntj|�t|�\}}|r�t|�r�djt|��}nyt|�Wntk
r�nXt	j
d|�r�d}nd}td|||f��ndS(s�
    Execute a command in a sub-process.

    Parameters
    ----------
    cmd : str
        The command to execute.
    display : str or sequence of str, optional
        The text to add to the log file kept by `numpy.distutils`.
        If not given, `display` is equal to `cmd`.

    Returns
    -------
    None

    Raises
    ------
    DistutilsExecError
        If the command failed, i.e. the exit status was not 0.

    t sToo many open filess2
Try rerunning setup command until build succeeds.ts)Command "%s" failed with exit status %d%sN(RRtjointlistRtinfoR
tprinttUnicodeErrortretsearchR(Rtcmdtdisplaytstotmsg((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/ccompiler.pytCCompiler_spawns"

	tspawnR#cC`sG|dkrd}ng}x%|D]}tjjtjj|��\}}tjj|�d}|tjj|�}|jd�r�|jd�d}|| }	tjj	tjj
|	��}	|	||}n||jkr�td||f��n|rtjj	|�}ntjj
|||j�}
|j|
�q"W|S(s�
    Return the name of the object files for the given source files.

    Parameters
    ----------
    source_filenames : list of str
        The list of paths to source files. Paths can be either relative or
        absolute, this is handled transparently.
    strip_dir : bool, optional
        Whether to strip the directory from the returned paths. If True,
        the file name prepended by `output_dir` is returned. Default is False.
    output_dir : str, optional
        If given, this path is prepended to the returned paths to the
        object files.

    Returns
    -------
    obj_names : list of str
        The list of paths to the object files corresponding to the source
        files in `source_filenames`.

    R#is..is"unknown file type '%s' (from '%s')N(Rtostpathtsplitexttnormpatht
splitdrivetisabst
startswithtrfindtbasenametabspathtsrc_extensionstUnknownFileErrorR$t
obj_extensiontappend(Rtsource_filenamest	strip_dirt
output_dirt	obj_namestsrc_nametbasetexttitdtobj_name((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/ccompiler.pytCCompiler_object_filenamesKs&	
$
tobject_filenamesc	`s+|s
gStjddkr<ddlm}	m}
m}nddlm}	m}
m}t�|	�r�g}x\dddgD]K}
t�d|
�}|dkr�q}n|j
d	|
d
j|�f�q}Wdj|�}n�j}dd
j|�f}t
j|��j|||||��\}}��}�j�||��d
d
j��}�r|dd
j��7}nt
j|�����fd�}t�|	�r�t|j��}gg}}x�|D]�}||kr�||\}}�jdkr%t|�}t|�}n|
|�rZ||�rZ|j
|||ff�qv|j
|||ff�q�q�W|}x'|D]}||�q�Wn|j�}t�}t|�dkr|dkrddl}|jj|�}|j||�|j�nx|D]}||�qW|S(s�
    Compile one or more source files.

    Please refer to the Python distutils API reference for more details.

    Parameters
    ----------
    sources : list of str
        A list of filenames
    output_dir : str, optional
        Path to the output directory.
    macros : list of tuples
        A list of macro definitions.
    include_dirs : list of str, optional
        The directories to add to the default include file search path for
        this compilation only.
    debug : bool, optional
        Whether or not to output debug symbols in or alongside the object
        file(s).
    extra_preargs, extra_postargs : ?
        Extra pre- and post-arguments.
    depends : list of str, optional
        A list of file names that all targets depend on.

    Returns
    -------
    objects : list of str
        A list of object file names, one per source file `sources`.

    Raises
    ------
    CompileError
        If compilation fails.

    iii(t	FCompilert	is_f_filethas_f90_headertf77tf90tfixt	compiler_sFortran %s compiler: %sR"s
sC compiler: %s
scompile options: '%s's
extra options: '%s'c`s2|\}\}}�j|||����dS(N(t_compile(RtobjtsrcRF(tcc_argstextra_postargstpp_optsR(sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/ccompiler.pytsingle_compile�stabsoftN(RRt	fcompilerRLRMRNtnumpy.distutils.fcompilert
isinstancetgetattrRR?R$tcompiler_soRR&t_setup_compilet_get_cc_argsR%tkeyst
compiler_typeRtitemsRtlentmultiprocessing.pooltpoolt
ThreadPooltmaptclose(RtsourcesRBtmacrostinclude_dirstdebugt
extra_preargsRWtdependsRLRMRNR,tfctfcomptccomptobjectstbuildRYtobjects_to_buildtf77_objectst
other_objectsRTRURFtbuild_itemsR.tjobstmultiprocessingRg((RVRWRXRsL/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/ccompiler.pytCCompiler_compilezsb)$	



 
	

tcompilec`sKtjd|jj�jjf���fd�}|d�rT|j�j�n|d�r�x*�jD]\}}|j||�qjWn|d�r�x!�jD]}|j	|�q�Wn|d�r�|j
|j�j�n|d�r	|j|j
�j
�n|d�r(|j�j�n|d	�rG|j�j�nd
S(s�
    Customize compiler using distutils command.

    Parameters
    ----------
    cmd : class instance
        An instance inheriting from `distutils.cmd.Command`.
    ignore : sequence of str, optional
        List of `CCompiler` commands (without ``'set_'``) that should not be
        altered. Strings that are checked for are:
        ``('include_dirs', 'define', 'undef', 'libraries', 'library_dirs',
        'rpath', 'link_objects')``.

    Returns
    -------
    None

    scustomize %s using %sc`s"t�|d�dk	o!|�kS(N(R^R(tattr(R+tignore(sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/ccompiler.pytallowsRmtdefinetundeft	librariestlibrary_dirstrpathtlink_objectsN(RR&t	__class__t__name__tset_include_dirsRmR�tdefine_macroR�tundefine_macrot
set_librariesR�tset_library_dirsR�tset_runtime_library_dirsR�tset_link_objectsR�(RR+RR�tnametvaluetmacro((R+RsL/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/ccompiler.pytCCompiler_customize_cmd�s&t
customize_cmdc	
C`sg}d}t|jj��}xHdddddddd	d
dg
D]"}||krF|j|�qFqFWx]|D]U}t||�rst||�}t|t|��}|j|t|�f�qsqsWg}dt|d
�d}x|D]}|j||�q�Wdj	|�S(NitversionR�R�t
object_switchtcompile_switchRmR�R�R�R�s%-iss = %ss
(
R%texecutablesRbR?thasattrR^tmaxRetreprR$(	tcompilertpropstmxRbtkeytvtlinestformattprop((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/ccompiler.pyt_compiler_to_strings$
 
cC`sjy|j�WnnXtjjdkrftdd�t|j�tt|��tdd�ndS(s�
    Print the compiler customizations to stdout.

    Parameters
    ----------
    None

    Returns
    -------
    None

    Notes
    -----
    Printing is only done if the distutils log threshold is < 2.

    iRiPN(tget_versionRt_global_logt	thresholdR'R�R�(R((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/ccompiler.pytCCompiler_show_customization,s
tshow_customizationcC`s:tjd|jj�t|�|r6y|jjd�Wnttfk
rTnXt	|d�r�d|j
dkr�|js3|j
djd�r�d\}}nd\}}|j
dj
||�g|j
d	|_q3q6t	|d�r
tjd
|j
f�nt	|d�s6tjd|jj�q6nd
S(sm
    Do any platform-specific customization of a compiler instance.

    This method calls `distutils.sysconfig.customize_compiler` for
    platform-specific customization, as well as optionally remove a flag
    to suppress spurious warnings in case C++ code is being compiled.

    Parameters
    ----------
    dist : object
        This parameter is not used for anything.
    need_cxx : bool, optional
        Whether or not C++ has to be compiled. If so (True), the
        ``"-Wstrict-prototypes"`` option is removed to prevent spurious
        warnings. Default is False.

    Returns
    -------
    None

    Notes
    -----
    All the default options used by distutils can be extracted with::

      from distutils import sysconfig
      sysconfig.get_config_vars('CC', 'CXX', 'OPT', 'BASECFLAGS',
                                'CCSHARED', 'LDSHARED', 'SO')

    scustomize %ss-Wstrict-prototypesR�tccitgccsg++sc++is#### %s #######tcompiler_cxxsMissing compiler_cxx fix for N(R�sg++(R�sc++(RR&R�R�R	R_tremovetAttributeErrort
ValueErrorR�R�R�R8treplacetwarn(Rtdisttneed_cxxtatb((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/ccompiler.pytCCompiler_customizeQs&
"	t	customizes[-.\d]+c`s���fd�}|S(sU
    Simple matching of version numbers, for use in CCompiler and FCompiler.

    Parameters
    ----------
    pat : str, optional
        A regular expression matching version numbers.
        Default is ``r'[-.\d]+'``.
    ignore : str, optional
        A regular expression matching patterns to skip.
        Default is ``''``, in which case nothing is skipped.
    start : str, optional
        A regular expression matching the start of where to start looking
        for version numbers.
        Default is ``''``, in which case searching is started at the
        beginning of the version string given to `matcher`.

    Returns
    -------
    matcher : callable
        A function that is appropriate to use as the ``.version_match``
        attribute of a `CCompiler` class. `matcher` takes a single parameter,
        a version string.

    c`s�|jdd�}d}�rItj�|�}|s:dS|j�}nx^tr�tj�||�}|srdS�r�tj�|jd��r�|j�}qLnPqLW|jd�S(Ns
R"i(R�R)tmatchRtendtTrueR*tgroup(Rtversion_stringtposR (Rtpattstart(sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/ccompiler.pytmatcher�s 	!((R�RR�R�((RR�R�sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/ccompiler.pytsimple_version_match�sc`s|rt|d�r|jS|j�y
|j}Wntk
rHdSX|s[|dr_dSy
|j}WnBtk
r�y
|j�Wntk
r�dSX�fd�}nXt|dd�\}}d}||kr�||�}|r�t	|�}q�n||_|S(s�
    Return compiler version, or None if compiler is not available.

    Parameters
    ----------
    force : bool, optional
        If True, force a new determination of the version, even if the
        compiler already has a version attribute. Default is False.
    ok_status : list of int, optional
        The list of status values returned by the version look-up process
        for which a version string is returned. If the status value is not
        in `ok_status`, None is returned. Default is ``[0]``.

    Returns
    -------
    version : str or None
        Version string, in the format of `distutils.version.LooseVersion`.

    R�ic`s/tj�|�}|sdS|jd�}|S(NR�(R)R�RR�(R�R R�(R�(sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/ccompiler.pyR��s
tuse_teeN(
R�R�tfind_executablestversion_cmdR�Rt
version_matchtversion_patternR
R
(Rtforcet	ok_statusR�R�tstatustoutputR�((R�sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/ccompiler.pytCCompiler_get_version�s2






	R�cC`s�|jd	kr|St|�}|jdg|jd|_tjjd�r�d|jdkr�|jd|jdg|jd|_n|jdg|jd|_|S(
s�
    Return the C++ compiler.

    Parameters
    ----------
    None

    Returns
    -------
    cxx : class instance
        The C++ compiler, as a `CCompiler` instance.

    tmsvctintelwtintelemwiitaixt	ld_so_aixi(R�R�R�(RcRR�R_RtplatformR8t	linker_so(Rtcxx((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/ccompiler.pytCCompiler_cxx_compiler�s%tcxx_compilertintelccompilertIntelCCompilers(Intel C Compiler for 32-bit applicationstinteltIntelItaniumCCompilers7Intel C Itanium Compiler for Itanium-based applicationstinteletIntelEM64TCCompilers(Intel C Compiler for 64-bit applicationstintelemtIntelCCompilerWs3Intel C Compiler for 32-bit applications on WindowsR�tIntelEM64TCCompilerWs3Intel C Compiler for 64-bit applications on WindowsR�t
pathccompilertPathScaleCCompilers2PathScale Compiler for SiCortex-based applicationstpathccslinux.*tnttwin32tmingw32ccompilertMingw32CCompilers>Mingw32 port of GNU C Compiler for Win32(for MSC built Python)Rs+Setting mingw32 as default compiler for nt.cC`s�|dkrtj}ny2|dkr6t|�}nt|\}}}WnDtk
r�d|}|dk	r�|d|}nt|��nXd|}yt|�Wn�tk
r,t	t
��}tjdt	|��|d}yt|�Wq-tk
r(t	t
��}t
d|��q-XnXy!tj|}	t|	�|}
Wn+tk
r{t
dd||f��nX|
d||�}tjd	|
�|S(
Ns5don't know how to compile C/C++ code on platform '%s's with '%s' compilersnumpy.distutils.s,%s in numpy.distutils; trying from distutilsis4can't compile C/C++ code: unable to load module '%s's4can't compile C/C++ code: unable to find class '%s' sin module '%s'snew_compiler returns %s(RR2R�tget_default_compilertcompiler_classtKeyErrorRt
__import__tImportErrortstrRRR&RRtmodulestvarsRn(tplatR�tverbosetdry_runR�tmodule_namet
class_nametlong_descriptionR/tmoduleR((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/ccompiler.pytnew_compiler/sD



	




cC`swt|�}t|�}t||||�}g}x=|D]5}t|�rb|jt|��q:|j|�q:W|S(N(Rt_distutils_gen_lib_optionsRtextendR%R?(R�R�truntime_library_dirsR�trtlib_optsRG((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/ccompiler.pytgen_lib_options[s	
tmsvc9R�t_msvctbcpptcygwinctemxctunixcs
distutils.R�R�cC`st|�}t||�S(N(Rt!_distutils_gen_preprocess_options(RlRm((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/ccompiler.pytgen_preprocess_optionsrss
[^\\\'\"%s ]*s'(?:[^'\\]|\\.)*'s"(?:[^"\\]|\\.)*"s\scC`s�|j�}g}d}x�|r�tj||�}|j�}|t|�krf|j|| �Pn||tjkr�|j|| �||j�}d}n(||dkr�|| ||d}|d}n�||dkr�t	j||�}n9||dkr t
j||�}ntd||��|dkrWt
d||��n|j�\}}tj||d|d!�r�|| ||d|d!||}|j�d}n|j�}|t|�kr|j|�PqqW|S(	Nis\it't"s!this can't happen (bad char '%c')s"bad string (mismatched %s quotes?)i(tstript
_wordchars_reR�R�ReR?tstringt
whitespacetlstript
_squote_ret
_dquote_retRuntimeErrorRR�tspant
_has_white_reR*(R-twordsR�R R�tbeg((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/ccompiler.pytsplit_quoted�s@		
%
((R�R�s(Intel C Compiler for 32-bit applications(R�R�s7Intel C Itanium Compiler for Itanium-based applications(R�R�s(Intel C Compiler for 64-bit applications(R�R�s3Intel C Compiler for 32-bit applications on Windows(R�R�s3Intel C Compiler for 64-bit applications on Windows(R�R�s2PathScale Compiler for SiCortex-based applications(slinux.*R�(slinux.*R�(slinux.*R�(slinux.*R�(R�R�(R�R�(R�R�s>Mingw32 port of GNU C Compiler for Win32(for MSC built Python)(R�R((R�R(Et
__future__RRRR2R)RRRt	distutilsRtdistutils.ccompilertdistutils.errorsRRRtdistutils.sysconfigR	tdistutils.versionR
tnumpy.distutilsRtnumpy.distutils.compatRtnumpy.distutils.exec_commandR
tnumpy.distutils.misc_utilRRRRRR!RR0t	CCompilerRJR|R�R�R�R�R�tFalseR�R�R�t_default_compilersR�R&R�t_distutils_new_compilerR�R�t_ccR�tgett_mRRRRR}R	RRRRR(((sL/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/ccompiler.pyt<module>s�
(		*-	o)		#9/5	







	
%			"			/

Zerion Mini Shell 1.0