Your IP : 172.28.240.42


Current Path : /usr/share/python/debpython/
Upload File :
Current File : //usr/share/python/debpython/debhelper.pyc


JQc@sgddlZddlmZmZddlmZmZmZeje	Z
defdYZdS(iN(tmakedirstchmod(texiststjointdirnamet	DebHelpercBsVeZdZdZdZdZdZdZdZdZ	dZ
RS(	s>Reinvents the wheel / some dh functionality (Perl is ugly ;-P)cCs||_i|_d|_t}d}|j}|j}ytdd}Wntk
rkt	dnXt
}}x|D]}	|	jst
}d}q}n|r%|jdrq}n|r||krq}n|r||krq}n|	jdrU|	dj}
|
|j|d<q}qUq}|	jdr|	d	j}|jdrit
jd
|q}n|r||krq}n|r||krq}niid6id6gd
6dd6|j|<q}|	jdr|	dj|_q}|r}|	jdr't}|js'|	dj|_q'n|	jdrUt}|	dj|_qUq}q}W|ru|rut
jdnt
jd|j|jjdS(Nsdebian/controltrscannot find debian/control filetpython3s
Architecture:i
tarchsPackage:isskipping Python 3.X package: %st	substvarstautoscriptst	rtupdatestanysSource:isXS-Python-Version:isX-Python-Version:is3Please remove XS-Python-Version from debian/controlssource=%s, binary packages=%s(toptionstpackagestNonetpython_versiontTruetpackaget
no_packagetopentIOErrort	ExceptiontFalsetstript
startswithtlogtdebugtsource_nameterrortkeys(tselfR
tsource_sectiontbinary_packagetpkgst	skip_pkgstfptxspvtxpvtlineR((s(/usr/share/python/debpython/debhelper.pyt__init__ sn					


	
	cCs(|j|dj|gj|dS(sdebhelper's addsubstvarR	N(Rt
setdefaulttappend(RRtnametvalue((s(/usr/share/python/debpython/debhelper.pytaddsubstvar`scCs4|j|dj|ij|gj|dS(sdebhelper's autoscriptR
N(RR)R*(RRtwhenttemplatetargs((s(/usr/share/python/debpython/debhelper.pyt
autoscriptdscCs|j|dj|dS(NR(RR*(RRR,((s(/usr/share/python/debpython/debhelper.pytadd_rtupdateisc	Csx|jjD]\}}|jd}|s7qnx|jD]y\}}d||f}t|rt|dj}nd}d}x|jD]\}	}
x|
D]}tttdd|	}t|sd|	}nt|dj}
|j	j
r'|
r'|
jdd}
n|
jd|}
|
jd	|}
|
|kr|
|kr|d
|
7}qqWqW|rD|dd|7}t|d
}|j||j
qDqDWqWdS(NR
sdebian/%s.%s.debhelperRts..sautoscripts/%ss#/usr/share/debhelper/autoscripts/%ss	#PACKAGE#s#ARGS#s
%ss%
# Automatically added by dh_python2:s%%s
# End automatically added section
tw(Rt	iteritemstgetRRtreadRRt__file__R
tcompile_alltreplacetwritetclose(RRtsettingsR
R.t	templatestfntdatatnew_datattpl_nameR0titfpathttplR$((s(/usr/share/python/debpython/debhelper.pytsave_autoscriptsls:



cCsx|jjD]\}}|jd}|s7qnd|}t|ret|dj}nd}xc|jD]U\}}|jd|}|dkra||jd}	||td||	dkr||	nd!}
g|
j	dD]}|r|j
^q}|	dkrT|||	j
rTd	|| |||	f}qg|| }ng}x*|D]"}
|
|krn|j|
qnqnW|rx|r|d7}n|d
|dj|f7}qxqxW|j
dd}|rt|d
}|j||jqqWdS(NR	sdebian/%s.substvarsRR3s%s=is
t,s%s
%ss%s=%s
s, s

R4(RR5R6RRR7tfindtlenRtsplitRR*RR:R;R<(RRR=R	R?R@R+tvaluestpteR'RCtitemstjR$((s(/usr/share/python/debpython/debhelper.pytsave_substvarss>
. 


$
cCsMxF|jjD]5\}}|jjr.dnd|}|jd}|sSqnd|}t|svt|nd||f}t|rt|dj}nd}xV|D]N\}}	dd	||fd
||	|f}
|
|kr|d|
7}qqW|rt|d}|j	||j
t|d
qqWdS(NR3s-p %sRs$debian/%s/usr/share/python/runtime.ds%s/%s.rtupdateRs#! /bin/sh
set -esif [ "$1" = rtupdate ]; thens
	pyclean %s %ss
	pycompile %s %s %s
fis
%sR4i(RR5R
R9R6RRRR7R;R<R(RRR=tpkg_argRKtdR?R@tdnameR0tcmdR$((s(/usr/share/python/debpython/debhelper.pyt
save_rtupdates,



cCs"|j|j|jdS(N(RPRFRU(R((s(/usr/share/python/debpython/debhelper.pytsaves

(t__name__t
__module__t__doc__R(R-R1R2RFRPRURV(((s(/usr/share/python/debpython/debhelper.pyRs	@				%	$	(
tloggingtosRRtos.pathRRRt	getLoggerRWRtobjectR(((s(/usr/share/python/debpython/debhelper.pyt<module>s