%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/
Upload File :
Create Path :
Current File : //opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/mingw32ccompiler.pyo

�
�9Zc@`s�dZddlmZmZmZddlZddlZddlZddlZddl	Z
ejddkr�ddlm
Z
nddlm
Z
ddlZddlmZddl	mZmZdd	lmZdd
lmZddlmZmZmZddlmZm Z ej!d
�Z"ej!d�Z#dej$j%fd��YZ&d�Z'd�Z(d�Z)d�Z*e+d�Z,d�Z-d�Z.d�Z/iZ0ej1dkrNyxddl2Z2de0d<de0d<de0d<e3e2d �r)e2j4j5d!d"�\Z6Z7Z8e2j4e0e6e7<[6[7[8nWqNe9k
rJe
j:d#�qNXnd$�Z;d%d&�Z<d'�Z=d(�Z>d)�Z?d*�Z@d+�ZAdS(,s
Support code for building Python extensions on Windows.

    # NT stuff
    # 1. Make sure libpython<version>.a exists for gcc.  If not, build it.
    # 2. Force windows to use gcc (we're struggling with MSVC and g77 support)
    # 3. Force windows to use g77

i(tdivisiontabsolute_importtprint_functionNii(tlog(t
StrictVersion(tgen_preprocess_optionstgen_lib_options(t
UnixCCompiler(tget_build_version(tDistutilsExecErrortCompileErrortUnknownFileError(tmsvc_runtime_librarytget_build_architectures\[Ordinal/Name Pointer\] Tables$^\s+\[([\s*[0-9]*)\] ([a-zA-Z0-9_]*)tMingw32CCompilercB`sPeZdZdZdddd�Zddddddd�Zddd�ZRS(sH A modified MingW32 compiler compatible with an MSVC built Python.

    tmingw32icC`swtjjj||||�|jdkr�ddl}tjddgdt	dtj
�}|jj�}|jj
�|jd|�}|r�t|jd��|_q�n|jdkr�d	}nd
}|jdkr�d|_n|jdkrd|_nt�t�}	td
t	�}
|	s,|
r<|jd�ndtt�jd��}|jd|�t�dkr�|jdkr�|jdddddddd�qg|jdddddddd�n�|jd kr|jdd!dd"dd#dd$|j|f�nV|jdkrE|jdd%dd&dd#dd'�n"|jdd(dd)dd*dd+�dg|_dS(,Nitgccs-dumpversiontshelltstdouts
(\d+\.\d+)is2.91.57s--entry _DllMain@12ttdllwrapsg++tdebugtNPY_MINGW_USE_CUSTOM_MSVCRs0x%03i0tmsvcrt__MSVCRT_VERSION__tAMD64s4.0tcompilers/gcc -g -DDEBUG -DMS_WIN64 -mno-cygwin -O0 -Walltcompiler_sosCgcc -g -DDEBUG -DMS_WIN64 -mno-cygwin -O0 -Wall -Wstrict-prototypest
linker_exesgcc -g -mno-cygwint	linker_sosgcc -g -mno-cygwin -shareds#gcc -g -DDEBUG -DMS_WIN64 -O0 -Walls7gcc -g -DDEBUG -DMS_WIN64 -O0 -Wall -Wstrict-prototypessgcc -gsgcc -g -shareds3.0.0sgcc -mno-cygwin -O2 -ws0gcc -mno-cygwin -mdll -O2 -w -Wstrict-prototypessg++ -mno-cygwins%s -mno-cygwin -mdll -static %ssgcc -mno-cygwin -O2 -Walls-gcc -mno-cygwin -O2 -Wall -Wstrict-prototypessg++ -mno-cygwin -shareds
gcc -O2 -Walls!gcc -O2 -Wall -Wstrict-prototypessg++ sg++ -shared(t	distutilstcygwinccompilertCygwinCCompilert__init__tgcc_versiontNonetret
subprocesstPopentTruetPIPERtreadtclosetsearchRtgroupt
linker_dlltlinkertbuild_import_librarytbuild_msvcr_librarytdefine_macrotintRtlstripR
tset_executablestcompiler_cxx(tselftverbosetdry_runtforceR$tpt
out_stringtresulttentry_pointt
msvcr_successtmsvcr_dbg_successt
msvcr_version((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/mingw32ccompiler.pyR!4sp

			
	
		
cC`s�t�}|r.|sg}n|j|�n||||||||d|	|
|||
f}|jdkrtjjj}n	tj}|||j	j
 �dS(Ns3.0.0(RtappendR#R"RRR tlinkRt__code__tco_argcount(R6ttarget_desctobjectstoutput_filenamet
output_dirt	librariestlibrary_dirstruntime_library_dirstexport_symbolsRt
extra_preargstextra_postargst
build_tempttarget_langtruntime_librarytargstfunc((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/mingw32ccompiler.pyRB�s0				Rc	C`s1|dkrd}ng}x|D]}tjjtjj|��\}}tjj|�\}}|rw|d}n||jddgkr�td||f��n|r�tjj|�}n|dks�|dkr|j	tjj
||||j��q"|j	tjj
|||j��q"W|S(NRis.rcs.ress"unknown file type '%s' (from '%s')(R#tostpathtsplitexttnormcaset
splitdrivetsrc_extensionsRtbasenameRAtjoint
obj_extension(	R6tsource_filenamest	strip_dirRHt	obj_namestsrc_nametbasetexttdrv((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/mingw32ccompiler.pytobject_filenames�s(	
$
N(t__name__t
__module__t__doc__t
compiler_typeR!R#RBRd(((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/mingw32ccompiler.pyR-srcC`s�gtjd D]}t|�^q\}}}d||f}td|�tjtjjtjd�g}y'|jtjjtj	dd��Wnt
k
r�nXx9|D]1}tjj||�}tjj|�r�|Sq�Wtd||f��dS(Nispython%d%d.dllsLooking for %stlibt
SYSTEMROOTtsystem32s%s not found in %s(
tsystversion_infoR2tprinttprefixRTRUR[RAtenvirontKeyErrortexistst
ValueError(titmajtmintmicrotdllnametlib_dirstdtdll((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/mingw32ccompiler.pytfind_python_dll�s/!'

cC`s.tjdd|gdtj�}|jj�S(Nsobjdump.exes-pR(R%R&R(Rt	readlines(R{tst((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/mingw32ccompiler.pyt
dump_tables!c	C`s}t|�}xCtt|��D]#}tj||j��rPqqWtd��g}xut|dt|��D]Z}tj||j��}|r�|jt	|j
d�j��|j
d�f�qrPqrWt|�dkr�tj
d|�nt|d�}|jdtjj|��|jd�|jd	�|jd
�x#|D]}|jd|d�qPW|j�dS(
s�Given a dll file location,  get all its exported symbols and dump them
    into the given def file.

    The .def file will be overwrittensSymbol table not foundiiisNo symbols found in %stwsLIBRARY        %s
s,;CODE          PRELOAD MOVEABLE DISCARDABLE
s;DATA          PRELOAD SINGLE
s	
EXPORTS
s%s
N(Rtrangetlent_STARTtmatchtdecodeRst_TABLERAR2R,tstripRtwarntopentwriteRTRURZR*(	R{tdfiletdumpRttsymstjtmRzts((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/mingw32ccompiler.pytgenerate_defs* 4



c`sIidd6dd6t���fd�}d�}||�pH||�S(Ntamd64Rtx86tIntelc`s�tjjtjdd�}tjj|�s2dSxKtj|�D]:\}}}||krB�|krBtjj||�SqBWdS(NtWINDIRtwinsxs(RTRUR[RpRrR#twalk(tdll_nametwinsxs_pathtroottdirstfiles(tarch(sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/mingw32ccompiler.pyt_find_dll_in_winsxs.scS`sfx_tjgtjdjd�D]=}tjj||�}tjj|�r!tjj|�Sq!WdS(NtPATHt;(	RlRoRTRptsplitRUR[Rrtabspath(R�RUtfilepath((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/mingw32ccompiler.pyt_find_dll_in_path8s'(R
(R�R�R�((R�sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/mingw32ccompiler.pytfind_dll)s


	c
C`sZtjdkrtSt�}t|jd��dkrHtjd�tS|r[|d7}nd|}tjj	t
jd|�}tjj|�r�tjd|f�t
S|d	}t|�}|s�tjd
|�tSd|}tjj	t
jd|�}tjd||f�t||�d
d|d|g}tj|�}	tj|�|	S(NtntRiPs=Skip building msvcr library: custom functionality not presentRzslib%s.atlibss(Skip building msvcr library: "%s" existss.dlls*Cannot build msvcr library: "%s" not founds	lib%s.defs&Building msvcr library: "%s" (from %s)tdlltools-ds-l(RTtnametFalseRR2R3RRRUR[RlRotisfileR'R�R�tinfoR�R%tcalltremove(
Rt
msvcr_nametout_nametout_filetmsvcr_dll_nametdll_filetdef_nametdef_filetcmdtretcode((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/mingw32ccompiler.pyR0Bs:	


	
	
	

cC`sVtjdkrdSt�}|dkr/t�S|dkrBt�Std|��dS(NR�RR�sUnhandled arch %s(RTR�R
t_build_import_library_amd64t_build_import_library_x86Rs(R�((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/mingw32ccompiler.pyR/ss	cC`s�t�}dttjd �}tjjtjd|�}tjj|�rbt	j
d|�dSdttjd �}tjjtjd|�}t	jd||f�t||�dd|d	|g}t
j|�dS(
Nslibpython%d%d.aiR�s)Skip building import library: "%s" existsspython%d%d.defs4Building import library (arch=AMD64): "%s" (from %s)R�s-ds-l(R|ttupleRlRmRTRUR[RoR�RRR�R�R%R&(R�R�R�R�R�R�((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/mingw32ccompiler.pyR�s			
cC`s�dttjd �}tjjtjd|�}dttjd �}tjjtjd|�}tjj|�s�tj	d|�dStjj|�r�tj
d|�dStjd|�d	d
lm
}dttjd �}tjjtjd|�}d|j|f}|j|�}|j|�\}	}
|j|	|
|jt|d
��dttjd �}|||f}d|}
tj|
�}|r�tj	d�ndS(s; Build the import libraries for Mingw32-gcc on Windows
    spython%d%d.libiR�slibpython%d%d.as+Cannot build import library: "%s" not foundNs)Skip building import library: "%s" existss(Building import library (ARCH=x86): "%s"i(tlib2defspython%d%d.defs%s %sR�spython%d%d.dlls-dlltool --dllname %s --def %s --output-lib %ss:Failed to build import library for gcc. Linking will fail.(R�RlRmRTRUR[RoR�RR�RR�tnumpy.distutilsR�t
DEFAULT_NMtgetnmtparse_nmt
output_deft
DEF_HEADERR�tsystem(tlib_nametlib_fileR�R�R�R�R�tnm_cmdt	nm_outputtdlisttflistR�RRR�tstatus((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/mingw32ccompiler.pyR��s2"
twin32s8.0.50727.42t80s9.0.21022.8t90s10.0.30319.460t100tCRT_ASSEMBLY_VERSIONt.is9Cannot import msvcrt: using manifest will not be possiblecC`siytt|d|�}Wn'tk
rEtd||f��nXd}|i|d6|d6|d6S(sUGiven a major and minor version of the MSVCR, returns the
    corresponding XML file.i
s)Version %d,%d of MSVCRT not supported yetsS<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
    <security>
      <requestedPrivileges>
        <requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel>
      </requestedPrivileges>
    </security>
  </trustInfo>
  <dependency>
    <dependentAssembly>
      <assemblyIdentity type="win32" name="Microsoft.VC%(maj)d%(min)d.CRT" version="%(fullver)s" processorArchitecture="*" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
    </dependentAssembly>
  </dependency>
</assembly>tfullverRuRv(t_MSVCRVER_TO_FULLVERtstrRqRs(RuRvR�ttemplate((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/mingw32ccompiler.pytmsvc_manifest_xml�s
R{cC`sH|dkrd}n%|dkr*d}ntd|��d||fS(sWReturn the rc file used to generate the res file which will be embedded
    as manifest for given manifest file name, of given type ('dll' or
    'exe').

    Parameters
    ----------
    name : str
            name of the manifest file to embed
    type : str {'dll', 'exe'}
            type of the binary which will embed the manifest

    R{itexeisType %s not supporteds&#include "winuser.h"
%d RT_MANIFEST %s(Rs(R�ttypetrctype((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/mingw32ccompiler.pytmanifest_rc�s
		cC`sZt�}|rVt|dd!�}|t|�ksVtdt|�|f��qVndS(s6msver is the ms runtime version used for the MANIFEST.ii����sKDiscrepancy between linked msvcr (%d) and the one about to be embedded (%d)N(RR2Rs(tmsvertmsvcvRu((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/mingw32ccompiler.pyt!check_embedded_msvcr_match_linkeds	cC`s5tjj|jdgd��}tjj|�dS(Ntyotci(RTRURZt_gen_temp_sourcefileRV(tconfigRa((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/mingw32ccompiler.pytconfigtest_name#s!cC`s$t|�}|jj}||dS(Ns	.manifest(R�Rt
exe_extension(R�R�texext((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/mingw32ccompiler.pyt
manifest_name'scC`st|�}|dS(Ns.rc(R�(R�R�((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/mingw32ccompiler.pytrc_name-scC`s�t�}|dk	r�|dkr�t|�t|�}t||d�}t||�}tt|�d�}|jjt|��|j	|�|j
�q�ndS(Nii
R�(tget_build_msvc_versionR#R�R2R�R�R�t
temp_filesRAR�R*(R�R�tmatmitmanxmltman((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/mingw32ccompiler.pytgenerate_manifest2s	

(BRgt
__future__RRRRTRlR%R$tnumpy.distutils.ccompilertnumpyRmRRR�tdistutils.cygwinccompilerRtdistutils.versionRRRtdistutils.unixccompilerRtdistutils.msvccompilerRR�tdistutils.errorsR	R
Rtnumpy.distutils.misc_utilRR
tcompileR�R�RR RR|RR�R�R�R0R/R�R�R�tplatformtmsvcrtthasattrR�R�tmajortminortresttImportErrorR�R�R�R�R�R�R�R�(((sS/opt/alt/python27/lib64/python2.7/site-packages/numpy/distutils/mingw32ccompiler.pyt<module>	s^�			!	1			2



	 				

Zerion Mini Shell 1.0