ok

Mini Shell

Direktori : /proc/self/root/usr/lib64/python2.7/site-packages/gtk-2.0/
Upload File :
Current File : //proc/self/root/usr/lib64/python2.7/site-packages/gtk-2.0/dsextras.pyo

�
�uTc@sddlZddlZddlZddlZddlZddlmZddlmZddl	m
Z
ddlmZddl
mZddlmZyLddlZddlmZdd	lmZdd
lmZmZmZWnek
reZnXeZgZgZ dZ!d�Z"d
�Z#d�Z$d�Z%d�Z&d�Z'd�Z(d�Z)d�Z*d�Z+d�Z,d�Z-defd��YZ.de
fd��YZ/defd��YZ0defd��YZ1d e2fd!��YZ3d"e1fd#��YZ4dS($i����N(tdep_util(t	build_ext(tinstall_lib(tinstall_data(t	Extension(tfind_executable(t	Overrides(t
DefsParser(tregister_typestSourceWritert
FileOutputs
***************************************************************************
Codegen could not be found on your system and is required by the
dsextras.Template and dsextras.TemplateExtension classes.
***************************************************************************
cCs�tjd|d�}tjjd�r2d}n'tjjd�rMd}ntd��x<t|�j�D](}|j|�}|rl|j	d�SqlWdS(s@Return the value of a m4_define variable as set in configure.in.sm4_define\(s\,\s*(.+)\)sconfigure.acsconfigure.ins$ERROR: Could not find configure fileiN(tretcompiletostpathtexistst
SystemExittopent	readlinestmatchtgrouptNone(tvarnametpatterntfnametlinet	match_obj((s6/usr/lib64/python2.7/site-packages/gtk-2.0/dsextras.pyt
get_m4_define*s		cCst|�dS(s=Return output (stdout or stderr) of executing cmd in a shell.i(tgetstatusoutput(tcmd((s6/usr/lib64/python2.7/site-packages/gtk-2.0/dsextras.pyt	getoutput=scCs�tjdkrjtj|d�}|j�}|j�p<d}x|dd	kr_|d }qBW||fSddlm}||�SdS(
s4Return (status, output) of executing cmd in a shell.twin32trii����s
s
(RN(s
s
(tsystplatformR
tpopentreadtclosetcommandsR(RtpipettexttstsR((s6/usr/lib64/python2.7/site-packages/gtk-2.0/dsextras.pyRAs
cCstd�rtSdS(sChecks for the existence of gcctgccN(RtTrue(((s6/usr/lib64/python2.7/site-packages/gtk-2.0/dsextras.pythave_gccPscCstd�rtSdS(s&Checks for the existence of pkg-configs
pkg-configN(RR+(((s6/usr/lib64/python2.7/site-packages/gtk-2.0/dsextras.pythave_pkgconfigUscCs�|jtj�dkrP|jtj�}tj|d tj�}|d}n|}d}tjj|�}g}xHtj|�D]7}t	j	||�r�|j
tjj||��q�q�W|S(s�List all files in a dir, with filename match support:
    for example: glade/*.glade will return all files in the glade directory
    that matches *.glade. It also looks up the full pathi����t.(tfindR
tseptsplittstringtjoinRtabspathtlistdirtfnmatchtappend(tdirtpartsRtretvaltfile((s6/usr/lib64/python2.7/site-packages/gtk-2.0/dsextras.pyt
list_filesZs
#cCsntjd|�}|stSt|�}tt|jd��}tt|jd��}||krjtStS(ssCheck the existence and version number of a package:
    returns False if not installed or too old, True otherwise.spkg-config --exists %sR.(R
tsystemtFalsetpkgc_get_versiontmaptintR1R+(tnametreq_versiontis_installedtorig_versiontversiontpkc_version((s6/usr/lib64/python2.7/site-packages/gtk-2.0/dsextras.pytpkgc_version_checkoscCstd|�S(s7return the version as return by pkg-config --modversionspkg-config --modversion %s(R(RB((s6/usr/lib64/python2.7/site-packages/gtk-2.0/dsextras.pyR?�scCs&td|�}|jdd�j�S(sCreturns a list of libraries as returned by pkg-config --libs-only-lspkg-config --libs-only-l %ss-lt(RtreplaceR1(RBtoutput((s6/usr/lib64/python2.7/site-packages/gtk-2.0/dsextras.pytpkgc_get_libraries�scCs&td|�}|jdd�j�S(sFreturns a list of library dirs as returned by pkg-config --libs-only-Lspkg-config --libs-only-L %ss-LRI(RRJR1(RBRK((s6/usr/lib64/python2.7/site-packages/gtk-2.0/dsextras.pytpkgc_get_library_dirs�scCs&td|�}|jdd�j�S(sHreturns a list of include dirs as returned by pkg-config --cflags-only-Ispkg-config --cflags-only-I %ss-IRI(RRJR1(RBRK((s6/usr/lib64/python2.7/site-packages/gtk-2.0/dsextras.pytpkgc_get_include_dirs�scCstd|�}|S(sAreturns the defs dir as returned by pkg-config --variable=defsdirs pkg-config --variable=defsdir %s(R(RBRK((s6/usr/lib64/python2.7/site-packages/gtk-2.0/dsextras.pytpkgc_get_defs_dir�stBuildExtcBs,eZd�Zd�Zd�Zd�ZRS(cCs�g|_tjdkr�|jjdkr�t�sBtd��nidd6dd6dd6}td	�}d
|||dfGH|jj||d�ndS(NRtmingw32sERROR: Could not find gcc.s-fnative-structt2s-mms-bitfieldst3t4sgcc -dumpversions)using MinGW GCC version %s with %s optioni(	textra_compile_argsR!R"tcompilert
compiler_typeR,RRR7(tselftmsnative_structtgcc_version((s6/usr/lib64/python2.7/site-packages/gtk-2.0/dsextras.pytinit_extra_compile_args�s	!	

cCsktjdkrg|jjdkrgt�s9td��n|jjjd�rg|jjjd�qgndS(NRRQsERROR: Could not find gcc.s-static(	R!R"RVRWR,Rt	linker_sotcounttremove(RX((s6/usr/lib64/python2.7/site-packages/gtk-2.0/dsextras.pytmodify_compiler�s
!	cCs%|j�|j�tj|�dS(N(R[R_Rtbuild_extensions(RX((s6/usr/lib64/python2.7/site-packages/gtk-2.0/dsextras.pyR`�s

cCs�|j|j7_t|d�r.|j�ntjdkr�|jjdkr�|j}g|jD]}|dkrb|^qb|_n	|j}tj	||�|dk	r�||jkr�||_ndS(NtgenerateRtmsvctctm(RcRd(RUthasattrRaR!R"RVRWt	librariesRtbuild_extensionR(RXtextt	save_libstlib((s6/usr/lib64/python2.7/site-packages/gtk-2.0/dsextras.pyRg�s
!		(t__name__t
__module__R[R_R`Rg(((s6/usr/lib64/python2.7/site-packages/gtk-2.0/dsextras.pyRP�s		
	t
InstallLibcBs/eZgZgZd�Zd�Zd�ZRS(cCs
||_dS(N(tinstall_dir(RXRn((s6/usr/lib64/python2.7/site-packages/gtk-2.0/dsextras.pytset_install_dir�scCstj|�|jS(N(Rtget_outputst
local_outputs(RX((s6/usr/lib64/python2.7/site-packages/gtk-2.0/dsextras.pyRp�scCstj|�|jS(N(Rt
get_inputstlocal_inputs(RX((s6/usr/lib64/python2.7/site-packages/gtk-2.0/dsextras.pyRr�s(RkRlRqRsRoRpRr(((s6/usr/lib64/python2.7/site-packages/gtk-2.0/dsextras.pyRm�s
		tInstallDatacBsPeZgZgZiZd�Zd�Zd�Zd�Zd�Z	d�Z
RS(cCs(tjdkr:tjj|jjtj�d �|_n(tjj|jjtj�d �|_d|_d|_d|_	d|_
d|_|jd|j�|jd	|j�|jd
|j�|jd|j	�|jd|j
�|jd
|j�|jdt
j�|jdd�dS(Ntnti����i����s
${prefix}/bins${prefix}/includes
${prefix}/libs${prefix}/sharetprefixtexec_prefixt
includedirtlibdirtdatarootdirtdatadirtPYTHONtTHREADING_CFLAGSRI(R
RBR0R3RnR1RvRwRxRyRzR{tadd_template_optionR!t
executable(RX((s6/usr/lib64/python2.7/site-packages/gtk-2.0/dsextras.pytprepare�s +(					cCs
||_dS(N(Rn(RXRn((s6/usr/lib64/python2.7/site-packages/gtk-2.0/dsextras.pyRoscCs||jd|<dS(Ns@%s@(ttemplate_options(RXRBtvalue((s6/usr/lib64/python2.7/site-packages/gtk-2.0/dsextras.pyR~scCs�tjj|�dd }t|�j�}x/|jj�D]\}}|j||�}q<Wtjj||�}|j	|�t|d�j
|�|jj|�|j
j|�|S(s<Install template filename into target directory install_dir.i����i����twb(R
RR1RR$R�titemsRJR3tmkpathtwriteRsR7Rq(RXtfilenameRntoutput_filettemplatetkeyR�RK((s6/usr/lib64/python2.7/site-packages/gtk-2.0/dsextras.pytinstall_templates
cCstj|�|jS(N(RRpRq(RX((s6/usr/lib64/python2.7/site-packages/gtk-2.0/dsextras.pyRpscCstj|�|jS(N(RRrRs(RX((s6/usr/lib64/python2.7/site-packages/gtk-2.0/dsextras.pyRrs(RkRlRqRsR�R�RoR~R�RpRr(((s6/usr/lib64/python2.7/site-packages/gtk-2.0/dsextras.pyRt�s					tPkgConfigExtensioncBsJeZdZdZd�Zd�Zd�Zd�Zd�Z	d�Z
RS(s
pygobject-2.0cKs�|d}d|kr6|dc|j|�t7<n|j|�t|d<t|d<d|kr|dc|j|�7<n|j|�|d<d|kr�|dc|j|�7<n|j|�|d<d|kr�|jd�|_n|jrN|dc|j|j�7<|dc|j|j�7<|dc|j|j�7<n|d|_|d|_|d|_	|d=|d=t
j||�dS(	Ntpkc_nametinclude_dirst
define_macrosRftlibrary_dirst
pygobject_pkcRBRG(tget_include_dirst
GLOBAL_INCt
GLOBAL_MACROSt
get_librariestget_library_dirstpopR�RBR�RGRt__init__(RXtkwargsRB((s6/usr/lib64/python2.7/site-packages/gtk-2.0/dsextras.pyR�#s,
 
	


cCsLt|�tkr|f}ng}x!|D]}|jt|��q+W|S(N(ttypettupletextendRN(RXtnamesR:RB((s6/usr/lib64/python2.7/site-packages/gtk-2.0/dsextras.pyR�Es
cCsLt|�tkr|f}ng}x!|D]}|jt|��q+W|S(N(R�R�R�RL(RXR�R:RB((s6/usr/lib64/python2.7/site-packages/gtk-2.0/dsextras.pyR�Ps
cCsLt|�tkr|f}ng}x!|D]}|jt|��q+W|S(N(R�R�R�RM(RXR�R:RB((s6/usr/lib64/python2.7/site-packages/gtk-2.0/dsextras.pyR�[s
cCs|jdk	r|jSt|j�tkrC|j|jfg}nt|j|j�}x�|D]�\}}tjd|�}|r�d||j	fGHt
|_t
St|�}tt
|jd��tt
|jd��kr�t|_tSd|GHd||fGHt
|_t
Sq_WdS(s.If the pkg-config version found is good enoughspkg-config --exists %ss>* %s.pc could not be found, bindings for %s will not be built.R.sWarning: Too old version of %ss%         Need %s, but %s is installedN(tcan_build_okRR�R�R�RGtzipR
R=RBR>R?R@RAR1R+(RXtreqstpackageRFR:RE((s6/usr/lib64/python2.7/site-packages/gtk-2.0/dsextras.pyt	can_buildfs*				cCsdS(N((RX((s6/usr/lib64/python2.7/site-packages/gtk-2.0/dsextras.pyRa�sN(RkRlR�RR�R�R�R�R�R�Ra(((s6/usr/lib64/python2.7/site-packages/gtk-2.0/dsextras.pyR�s	"				 tTemplatecBs>eZd�Zgded�Zd�Zd�Zd�ZRS(cOs/ts"td|jtf��ntj|�S(Ns'%s' is not defined
%s(ttemplate_classes_enabledt	NameErrorRktcodegen_error_messagetobjectt__new__(tclstargstkwds((s6/usr/lib64/python2.7/site-packages/gtk-2.0/dsextras.pyR��sc	Cs�||_||_||_||_||_g|_t|t�re|d|_|jj	|�n	||_g|_
xT|D]L}t|t�r�|j
j	|d�|jj	|�q~|j
j	|�q~WdS(Ni(toverrideRKRvt
load_typestpy_ssize_t_cleant
built_defst
isinstanceR�tdefsR7tregister(	RXR�RKR�RvR�R�R�R ((s6/usr/lib64/python2.7/site-packages/gtk-2.0/dsextras.pyR��s 						
		
cCs>|j}|j|j�|j|j�tj||j�S(N(R�R7R�R�Rtnewer_groupRK(RXtfiles((s6/usr/lib64/python2.7/site-packages/gtk-2.0/dsextras.pytcheck_dates�s
cCsSxL|jD]A\}}tj||�r
d|g|}tjj|�q
q
WdS(Ntdummy(R�RR�tcodegent
createdefstmain(RXttargettsourcesR�((s6/usr/lib64/python2.7/site-packages/gtk-2.0/dsextras.pyt
generate_defs�scCs|j�|j�rdSx:|jD]/}t|tt��}|j�t|�q$W|jryi}t	|j|�nt|j
tt��}|j�t|�t|jd�}t
|t|j�|jt||j��}|j|j�|j�dS(Ntw(R�R�R�RtdictR�tstartParsingRR�texecfileR�RRKR	RR�RvR
R�R�R%(RXtitemtdptglobalstfdtsw((s6/usr/lib64/python2.7/site-packages/gtk-2.0/dsextras.pyRa�s$

	

N(	RkRlR�RR>R�R�R�Ra(((s6/usr/lib64/python2.7/site-packages/gtk-2.0/dsextras.pyR��s
				tTemplateExtensioncBs#eZd�Zd�Zd�ZRS(cOs5ts"td|jtf��ntj|||�S(Ns'%s' is not defined
%s(R�R�RkR�R�R�(R�R�R�((s6/usr/lib64/python2.7/site-packages/gtk-2.0/dsextras.pyR��sc	Ks
|d}|d}t|t�r8|dd d}n|d d}|d}|jd�}|jdt�}g|_|jjt|||d	||d
||��|d
=|d=|d=|r�|d=n|jd�r�|d|d<|d=nt	j
||�dS(NRBR�ii����s.cR�R�R�tpyR�RK(R�R�tgetR�R>t	templatesR7R�thas_keyR�R�(RXR�RBR�RKR�R�R�((s6/usr/lib64/python2.7/site-packages/gtk-2.0/dsextras.pyR��s&


	



cCstd�|j�dS(NcSs
|j�S(N(Ra(tx((s6/usr/lib64/python2.7/site-packages/gtk-2.0/dsextras.pyt<lambda>�s(R@R�(RX((s6/usr/lib64/python2.7/site-packages/gtk-2.0/dsextras.pyRa�s(RkRlR�R�Ra(((s6/usr/lib64/python2.7/site-packages/gtk-2.0/dsextras.pyR��s		(5R
R!R6RR2t	distutilsRtdistutils.command.build_extRtdistutils.command.install_libRtdistutils.command.install_dataRtdistutils.extensionRtdistutils.spawnRtcodegen.createdefsR�tcodegen.overrideRtcodegen.defsparserRtcodegen.codegenRR	R
tImportErrorR>R�R+R�R�R�RRRR,R-R<RHR?RLRMRNRORPRmRtR�R�R�R�(((s6/usr/lib64/python2.7/site-packages/gtk-2.0/dsextras.pyt<module>sN 

												?8lN

Zerion Mini Shell 1.0