Your IP : 18.117.94.180


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

�
��f�[c@sdZddlZddlZddlmZmZmZmZmZddl	m
Z
mZmZddl
mZeZy@ddlZeZeZejZejZejZejZWn�ek
r:yLddlZddlZeZeZejZejZejZejZWnek
r5ejd�YnXYnXerbej ej!ej"ej#fZ$ndd�Z%d	d
�Z&dd�Z'Gd
d�d�Z(dd�Z)dd�Z*dd�Z+Gdd�de
�Z,e)�dkrej-d�e,Z.ddl/m,Z,ddl/m(Z(ndS(u�distutils.msvccompiler

Contains MSVCCompiler, an implementation of the abstract CCompiler class
for the Microsoft Visual Studio.
iN(uDistutilsExecErroruDistutilsPlatformErroruCompileErroruLibErroru	LinkError(u	CCompilerugen_preprocess_optionsugen_lib_options(ulogu�Warning: Can't read registry to find the necessary compiler setting
Make sure that Python modules winreg, win32api or win32con are installed.cCs�yt||�}Wntk
r+dSYnXg}d}xCyt||�}Wntk
rcPYnX|j|�|d7}q;|S(uReturn list of registry keys.iiN(uRegOpenKeyExuRegErroruNoneu
RegEnumKeyuappend(ubaseukeyuhandleuLuiuk((u;/opt/alt/python33/lib64/python3.3/distutils/msvccompiler.pyu	read_keys7s
	


u	read_keyscCs�yt||�}Wntk
r+dSYnXi}d}xayt||�\}}}Wntk
rlPYnX|j�}t|�|t|�<|d7}q;|S(uXReturn dict of registry keys and values.

    All names are converted to lowercase.
    iiN(uRegOpenKeyExuRegErroruNoneuRegEnumValueuloweruconvert_mbcs(ubaseukeyuhandleuduiunameuvalueutype((u;/opt/alt/python33/lib64/python3.3/distutils/msvccompiler.pyuread_valuesHs
	

uread_valuescCsJt|dd�}|dk	rFy|d�}WqFtk
rBYqFXn|S(Nudecodeumbcs(ugetattruNoneuUnicodeError(usudec((u;/opt/alt/python33/lib64/python3.3/distutils/msvccompiler.pyuconvert_mbcs]s
uconvert_mbcscBsD|EeZdZdd�Zdd�Zdd�Zdd�Zd	S(
u
MacroExpandercCsi|_|j|�dS(N(umacrosuload_macros(uselfuversion((u;/opt/alt/python33/lib64/python3.3/distutils/msvccompiler.pyu__init__gs	uMacroExpander.__init__cCsCx<tD]4}t||�}|r|||jd|<PqqWdS(Nu$(%s)(uHKEYSuread_valuesumacros(uselfumacroupathukeyubaseud((u;/opt/alt/python33/lib64/python3.3/distutils/msvccompiler.pyu	set_macroks

uMacroExpander.set_macroc
Cs=d|}|jd|dd�|jd|dd�d}|jd|d	�y9|d
krv|jd|d�n|jd|d
�Wn1tk
r�}ztd��WYdd}~XnXd}xrtD]j}yt||�}Wntk
r�w�YnXt|d�}t|d||f�}	|	d|jd<q�WdS(Nu%Software\Microsoft\VisualStudio\%0.1fuVCInstallDiru	\Setup\VCu
productdiruVSInstallDiru	\Setup\VSu Software\Microsoft\.NETFrameworkuFrameworkDiruinstallrootg@uFrameworkSDKDirusdkinstallrootv1.1usdkinstallrootuPython was built with Visual Studio 2003;
extensions must be built with a compiler than can generate compatible binaries.
Visual Studio 2003 was not found on this system. If you have Cygwin installed,
you can try compiling with MingW32, by passing "-c mingw32" to setup.py.u.Software\Microsoft\NET Framework Setup\Productiu%s\%suversionu$(FrameworkVersion)(	u	set_macrouKeyErroruDistutilsPlatformErroruHKEYSuRegOpenKeyExuRegErroru
RegEnumKeyuread_valuesumacros(
uselfuversionuvsbaseunetuexcupubaseuhukeyud((u;/opt/alt/python33/lib64/python3.3/distutils/msvccompiler.pyuload_macrosrs*


uMacroExpander.load_macroscCs6x/|jj�D]\}}|j||�}qW|S(N(umacrosuitemsureplace(uselfusukuv((u;/opt/alt/python33/lib64/python3.3/distutils/msvccompiler.pyusub�suMacroExpander.subN(u__name__u
__module__u__qualname__u__init__u	set_macrouload_macrosusub(u
__locals__((u;/opt/alt/python33/lib64/python3.3/distutils/msvccompiler.pyu
MacroExpanderfsu
MacroExpandercCs�d}tjj|�}|d
kr(dS|t|�}tj|d�jdd�\}}t|dd��d}t|dd��d}|dkr�d	}n|dkr�||SdS(u�Return the version of MSVC that was used to build Python.

    For Python 2.3 and up, the version number is included in
    sys.version.  For earlier versions, assume the compiler is MSVC 6.
    uMSC v.iiNu iig$@ii����i����(usysuversionufindulenusplituintuNone(uprefixuiusurestumajorVersionuminorVersion((u;/opt/alt/python33/lib64/python3.3/distutils/msvccompiler.pyuget_build_version�s%	uget_build_versioncCsXd}tjj|�}|dkr(dStjjd|�}tj|t|�|�S(uaReturn the processor architecture.

    Possible results are "Intel", "Itanium", or "AMD64".
    u bit (iuIntelu)i����(usysuversionufindulen(uprefixuiuj((u;/opt/alt/python33/lib64/python3.3/distutils/msvccompiler.pyuget_build_architecture�suget_build_architecturecCsIg}x<|D]4}tjj|�}||kr
|j|�q
q
W|S(unReturn a list of normalized paths with duplicates removed.

    The current order of paths is maintained.
    (uosupathunormpathuappend(upathsu
reduced_pathsupunp((u;/opt/alt/python33/lib64/python3.3/distutils/msvccompiler.pyunormalize_and_reduce_paths�s
unormalize_and_reduce_pathscBsw|EeZdZdZdZiZdgZdddgZdgZdgZ	eeee	Z
d	Zd
ZdZ
dZd
ZZdZddddd�Zdd�Zdddd�Zd,d,d,dd,d,d,dd�Zd,dd,dd�Zd,d,d,d,d,dd,d,d,d,dd�
Zdd�Zdd �Zd!d"�Zdd#d$�Zd%d&�Zd'd(d)�Zd*d+�Zd,S(-uMSVCCompileruwConcrete class that implements an interface to Microsoft Visual C++,
       as defined by the CCompiler abstract class.umsvcu.cu.ccu.cppu.cxxu.rcu.mcu.resu.obju.libu.dllu%s%su.exeicCs�tj||||�t�|_t�|_|jdkr�|jdkrjd|_t|j�|_n	d|_d|j|_	nd|jd|_	d|_dS(	NuInteliuSoftware\Microsoft\VisualStudiouSoftware\Microsoft\DevstudiouVisual Studio version %suMicrosoft SDK compiler %siF(u	CCompileru__init__uget_build_versionu_MSVCCompiler__versionuget_build_architectureu_MSVCCompiler__archu_MSVCCompiler__rootu
MacroExpanderu_MSVCCompiler__macrosu_MSVCCompiler__productuFalseuinitialized(uselfuverboseudry_runuforce((u;/opt/alt/python33/lib64/python3.3/distutils/msvccompiler.pyu__init__�s		uMSVCCompiler.__init__cCs�g|_dtjkrfdtjkrf|jd�rfd|_d|_d|_d|_d|_n�|j	d�|_t
|j�d	kr�td
|j��n|jd�|_|jd�|_|jd�|_|jd�|_|jd�|_|j
d�|j
d�y5x.tjdjd
�D]}|jj|�q1WWntk
r`YnXt|j�|_d
j|j�tjd<d|_|jdkr�ddddddg|_dddddddg|_n9ddddddg|_dddddddg|_dddg|_|jdkrRddddg|_ndddddg|_dg|_d |_dS(!NuDISTUTILS_USE_SDKuMSSdkucl.exeulink.exeulib.exeurc.exeumc.exeupathiuxPython was built with %s, and extensions need to be built with the same version of the compiler, but it isn't installed.ulibuincludeu;uIntelu/nologou/Oxu/MDu/W3u/GXu/DNDEBUGu/Odu/MDdu/Z7u/D_DEBUGu/GS-u/DLLu/INCREMENTAL:NOiu/INCREMENTAL:nou/DEBUGu	/pdb:NoneT(u_MSVCCompiler__pathsuosuenvironufind_exeucculinkeruliburcumcuget_msvc_pathsulenuDistutilsPlatformErroru_MSVCCompiler__productuset_path_env_varusplituappenduKeyErrorunormalize_and_reduce_pathsujoinuNoneupreprocess_optionsu_MSVCCompiler__archucompile_optionsucompile_options_debuguldflags_sharedu_MSVCCompiler__versionuldflags_shared_debuguldflags_staticuTrueuinitialized(uselfup((u;/opt/alt/python33/lib64/python3.3/distutils/msvccompiler.pyu
initialize�sR	-				


	uMSVCCompiler.initializeucCsD|dkrd}ng}x"|D]}tjj|�\}}tjj|�d}|tjj|�d�}||jkr�td|��n|r�tjj|�}n||j	kr�|j
tjj|||j��q"||j
kr|j
tjj|||j��q"|j
tjj|||j��q"W|S(NuiuDon't know how to compile %s(uNoneuosupathusplitextu
splitdriveuisabsusrc_extensionsuCompileErrorubasenameu_rc_extensionsuappendujoinu
res_extensionu_mc_extensionsu
obj_extension(uselfusource_filenamesu	strip_diru
output_diru	obj_namesusrc_nameubaseuext((u;/opt/alt/python33/lib64/python3.3/distutils/msvccompiler.pyuobject_filenames5s(	
uMSVCCompiler.object_filenamesc	Cs|js|j�n|j||||||�}	|	\}}
}}}|pRg}
|
jd�|r{|
j|j�n|
j|j�x�|
D]�}y||\}}Wntk
r�w�YnX|r�tj	j
|�}n||jkr�d|}n�||jkrd|}n�||j
kr�|}d|}y)|j|jg||g|g�Wq�tk
r�}zt|��WYdd}~Xq�Xq�n||jkr�tj	j|�}tj	j|�}y�|j|jgd|d|g|g�tj	jtj	j|��\}}tj	j||d�}|j|jgd|g|g�Wq�tk
r�}zt|��WYdd}~Xq�Xq�ntd||f��d	|}y-|j|jg|
|||g|�Wq�tk
r}zt|��WYdd}~Xq�Xq�W|
S(
Nu/cu/Tcu/Tpu/fou-hu-ru.rcu"Don't know how to compile %s to %su/Fo(uinitializedu
initializeu_setup_compileuappenduextenducompile_options_debugucompile_optionsuKeyErroruosupathuabspathu
_c_extensionsu_cpp_extensionsu_rc_extensionsuspawnurcuDistutilsExecErroruCompileErroru_mc_extensionsudirnameumcusplitextubasenameujoinucc(uselfusourcesu
output_dirumacrosuinclude_dirsudebugu
extra_preargsuextra_postargsudependsucompile_infouobjectsupp_optsubuilducompile_optsuobjusrcuextu	input_optu
output_optumsguh_dirurc_dirubaseu_urc_file((u;/opt/alt/python33/lib64/python3.3/distutils/msvccompiler.pyucompileTsj	






#$$#
#uMSVCCompiler.compilec	Cs�|js|j�n|j||�\}}|j|d|�}|j||�r�|d|g}|rony|j|jg|�Wq�tk
r�}zt|��WYdd}~Xq�Xnt	j
d|�dS(Nu
output_diru/OUT:uskipping %s (up-to-date)(uinitializedu
initializeu_fix_object_argsulibrary_filenameu
_need_linkuspawnulibuDistutilsExecErroruLibErrorulogudebug(	uselfuobjectsuoutput_libnameu
output_dirudebugutarget_languoutput_filenameulib_argsumsg((u;/opt/alt/python33/lib64/python3.3/distutils/msvccompiler.pyucreate_static_lib�s	
	"uMSVCCompiler.create_static_libcCs�|js|j�n|j||�\}}|j|||�}|\}}}|rr|jdt|��nt||||�}|dk	r�tj	j
||�}n|j||�rp|tj
kr�|	r�|jdd�}q|jdd�}n|	r|j}n	|j}g}x%|p+gD]}|jd|�q,W||||d|g}|dk	r�tj	jtj	j|��\}}tj	j
tj	j|d�|j|��}|jd|�n|
r�|
|dd�<n|r|j|�n|jtj	j|��y|j|jg|�Wq�tk
rl}zt|��WYdd}~Xq�Xntjd|�dS(Nu5I don't know what to do with 'runtime_library_dirs': iu/EXPORT:u/OUT:iu/IMPLIB:uskipping %s (up-to-date)(uinitializedu
initializeu_fix_object_argsu
_fix_lib_argsuwarnustrugen_lib_optionsuNoneuosupathujoinu
_need_linku	CCompileru
EXECUTABLEuldflags_shared_debuguldflags_shareduappendusplitextubasenameudirnameulibrary_filenameuextendumkpathuspawnulinkeruDistutilsExecErroru	LinkErrorulogudebug(uselfutarget_descuobjectsuoutput_filenameu
output_diru	librariesulibrary_dirsuruntime_library_dirsuexport_symbolsudebugu
extra_preargsuextra_postargsu
build_temputarget_langu
fixed_argsulib_optsuldflagsuexport_optsusymuld_argsudll_nameudll_extuimplib_fileumsg((u;/opt/alt/python33/lib64/python3.3/distutils/msvccompiler.pyulink�sV	
						"uMSVCCompiler.linkcCsd|S(Nu	/LIBPATH:((uselfudir((u;/opt/alt/python33/lib64/python3.3/distutils/msvccompiler.pyulibrary_dir_optionsuMSVCCompiler.library_dir_optioncCstd��dS(Nu<don't know how to set runtime library search path for MSVC++(uDistutilsPlatformError(uselfudir((u;/opt/alt/python33/lib64/python3.3/distutils/msvccompiler.pyuruntime_library_dir_optionsu'MSVCCompiler.runtime_library_dir_optioncCs
|j|�S(N(ulibrary_filename(uselfulib((u;/opt/alt/python33/lib64/python3.3/distutils/msvccompiler.pyulibrary_optionsuMSVCCompiler.library_optioncCs�|r|d|g}n	|g}xW|D]K}xB|D]:}tjj||j|��}tjj|�r6|Sq6Wq)WdSdS(Nu_d(uosupathujoinulibrary_filenameuexistsuNone(uselfudirsulibudebugu	try_namesudirunameulibfile((u;/opt/alt/python33/lib64/python3.3/distutils/msvccompiler.pyufind_library_file s	

uMSVCCompiler.find_library_filecCs�xH|jD]=}tjjtjj|�|�}tjj|�r
|Sq
WxUtjdjd�D]=}tjjtjj|�|�}tjj|�rb|SqbW|S(u�Return path to an MSVC executable program.

        Tries to find the program in several places: first, one of the
        MSVC program search paths from the registry; next, the directories
        in the PATH environment variable.  If any of those work, return an
        absolute path that is known to exist.  If none of them work, just
        return the original program name, 'exe'.
        uPathu;(u_MSVCCompiler__pathsuosupathujoinuabspathuisfileuenvironusplit(uselfuexeupufn((u;/opt/alt/python33/lib64/python3.3/distutils/msvccompiler.pyufind_exe2s	!!uMSVCCompiler.find_exeux86cCs	ts
gS|d}|jdkr<d|j|jf}nd|j|f}xctD][}t||�}|rV|jdkr�|jj||�jd�S||jd�SqVqVW|jdkrx>tD]3}t|d|j�d	k	r�|j	d�Pq�q�WngS(
u�Get a list of devstudio directories (include, lib or path).

        Return a list of strings.  The list will be empty if unable to
        access the registry or appropriate registry keys not found.
        u dirsiu6%s\%0.1f\VC\VC_OBJECTS_PLATFORM_INFO\Win32\Directoriesu?%s\6.0\Build System\Components\Platforms\Win32 (%s)\Directoriesu;iu%s\6.0u�It seems you have Visual Studio 6 installed, but the expected registry settings are not present.
You must at least run the Visual Studio GUI once so that these entries are created.N(
u
_can_read_regu_MSVCCompiler__versionu_MSVCCompiler__rootuHKEYSuread_valuesu_MSVCCompiler__macrosusubusplituNoneuwarn(uselfupathuplatformukeyubaseud((u;/opt/alt/python33/lib64/python3.3/distutils/msvccompiler.pyuget_msvc_pathsHs(



uMSVCCompiler.get_msvc_pathscCsP|dkr|jd�}n|j|�}|rLdj|�tj|<ndS(u�Set environment variable 'name' to an MSVC path type value.

        This is equivalent to a SET command prior to execution of spawned
        commands.
        ulibulibraryu;N(uget_msvc_pathsujoinuosuenviron(uselfunameup((u;/opt/alt/python33/lib64/python3.3/distutils/msvccompiler.pyuset_path_env_varls
uMSVCCompiler.set_path_env_varN( u__name__u
__module__u__qualname__u__doc__u
compiler_typeuexecutablesu
_c_extensionsu_cpp_extensionsu_rc_extensionsu_mc_extensionsusrc_extensionsu
res_extensionu
obj_extensionustatic_lib_extensionushared_lib_extensionustatic_lib_formatushared_lib_formatu
exe_extensionu__init__u
initializeuobject_filenamesuNoneucompileucreate_static_libulinkulibrary_dir_optionuruntime_library_dir_optionulibrary_optionufind_library_fileufind_exeuget_msvc_pathsuset_path_env_var(u
__locals__((u;/opt/alt/python33/lib64/python3.3/distutils/msvccompiler.pyuMSVCCompiler�sP			
BVF$uMSVCCompilerg @u3Importing new compiler from distutils.msvc9compiler(uMSVCCompiler(u
MacroExpander(0u__doc__usysuosudistutils.errorsuDistutilsExecErroruDistutilsPlatformErroruCompileErroruLibErroru	LinkErrorudistutils.ccompileru	CCompilerugen_preprocess_optionsugen_lib_optionsu	distutilsuloguFalseu
_can_read_reguwinreguTrueuhkey_modu	OpenKeyExuRegOpenKeyExuEnumKeyu
RegEnumKeyu	EnumValueuRegEnumValueuerroruRegErroruImportErroruwin32apiuwin32conuinfou
HKEY_USERSuHKEY_CURRENT_USERuHKEY_LOCAL_MACHINEuHKEY_CLASSES_ROOTuHKEYSu	read_keysuread_valuesuconvert_mbcsu
MacroExpanderuget_build_versionuget_build_architectureunormalize_and_reduce_pathsuMSVCCompilerudebuguOldMSVCCompilerudistutils.msvc9compiler(((u;/opt/alt/python33/lib64/python3.3/distutils/msvccompiler.pyu<module>sZ(			

			



	-
��


?>