ó +¢µRc@syddlZddlmZmZddlmZmZmZmZm Z dZ ej e ƒZ defd„ƒYZdS(iÿÿÿÿN(t parse_pydeptguess_dependency(tDEFAULTt SUPPORTEDt debsortedtvreprt vrange_strspython:any (>= 2.7.1-0ubuntu2)t DependenciescBsheZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z d „Z d „Z RS( s6Store relations (dependencies, etc.) between packages.cCsC||_g|_g|_g|_g|_g|_g|_dS(N(tpackagetdependst recommendstsuggeststenhancestbreakst rtscripts(tselfR((s&/usr/share/python/debpython/depends.pyt__init__#s      cCsýx'|jD]}|j|jd|ƒq Wx'|jD]}|j|jd|ƒq4Wx'|jD]}|j|jd|ƒq^Wx'|jD]}|j|jd|ƒqˆWx'|jD]}|j|jd|ƒq²Wx$|jD]}|j|j|ƒqÜWdS(sFill in debhelper's substvars.spython:Dependsspython:Recommendsspython:Suggestsspython:Enhancess python:BreaksN( R t addsubstvarRR R R R Rt add_rtupdate(Rtdhti((s&/usr/share/python/debpython/depends.pyt export_to,scCs,d|j|j|j|j|j|jfS(Ns#D=%s; R=%s; S=%s; E=%s, B=%s; RT=%s(R R R R R R(R((s&/usr/share/python/debpython/depends.pyt__str__;s cCs,|r(||jkr(|jj|ƒndS(N(R tappend(Rtvalue((s&/usr/share/python/debpython/depends.pytdepend@scCs,|r(||jkr(|jj|ƒndS(N(R R(RR((s&/usr/share/python/debpython/depends.pyt recommendDscCs,|r(||jkr(|jj|ƒndS(N(R R(RR((s&/usr/share/python/debpython/depends.pytsuggestHscCs,|r(||jkr(|jj|ƒndS(N(R R(RR((s&/usr/share/python/debpython/depends.pytenhanceLscCs,|r(||jkr(|jj|ƒndS(N(R R(RR((s&/usr/share/python/debpython/depends.pytbreak_PscCs&||jkr"|jj|ƒndS(N(RR(RR((s&/usr/share/python/debpython/depends.pytrtscriptTscCstjd|jƒt|dj|dƒƒ}|r×|jjdƒ}|rTdnd}|d}|d}|tkrŸ|jd ||d|d fƒn|tkr×|jd ||d|d d fƒq×n|d rñ|jtƒnx)|d D]\}} |jd|ƒqüWx|dj ƒD] \} } t d„| j d gƒDƒƒ} xD| D]<} | t kr‰|jd| ƒqctj dt| ƒƒqcWtd„| j d gƒDƒƒrÕ|jdƒn| j d tƒr.|jtƒd}|j}t| ƒd kr0|dt| dƒ7}n¾|rî|dt|ƒ7}|dkrYqî|d|d kr‹|jdt|dƒƒqî|dr³|jdt|dƒƒn|d rî|jd|d d|d d d fƒqînx1|jpýgD] }|d|jddƒ7}qþW|j| |fƒq.q.W|jrx9|dD]*}x!t|ƒD]}|j|ƒqcWqPWnx*|jpgD]}|jt|ƒƒq‘Wx*|jp½gD]}|jt|ƒƒq¾Wx*|jpêgD]}|jt|ƒƒqëWtj|ƒdS(Ns&generating dependencies for package %st public_verstexts-dbgs python-dbgtpythoniiÿÿÿÿs %s (>= %d.%d)is %s (<< %d.%d)tcompiletshebangss%s:anyt private_dirscss!|]\}}|r|VqdS(N((t.0Rtv((s&/usr/share/python/debpython/depends.pys ysspython%d.%d:anysJdependency on python%s (from shebang) ignored - it's not supported anymorecss'|]\}}|dkrtVqdS(N(tNonetTrue(R%RR&((s&/usr/share/python/debpython/depends.pys ‚ss python:anyts-V %ss python%s:anyspython:any (>= %s)spython:any (<< %d.%d)s -X '%s't's'\''s requires.txt(NN( tlogtdebugRtsortedtuniontendswithRRt MINPYCDEPt iteritemstlisttgetRtinfoRtanytFalsetvrangetlenRR'tregexprtreplaceRt guess_depsRR RR RR R(Rtstatstoptionstpub_verstdbgpkgttpltminvtmaxvt interpretertversiont private_dirtdetailstversionsR&targstvrtpatterntfnRtitem((s&/usr/share/python/debpython/depends.pytparseXsr     # "   "      ( ( t__name__t __module__t__doc__RRRRRRRRRRM(((s&/usr/share/python/debpython/depends.pyR s        (tloggingtdebpython.pydistRRtdebpython.versionRRRRRR0t getLoggerRNR+tobjectR(((s&/usr/share/python/debpython/depends.pyts (