Ńň QÜjZc @s ddklZddkZddkZddkZddklZlZlZlZddk l Z l Z ddddgZ ddd „ƒYZ d „Zdd „Zddd „Zdd „Zeiidƒpeidjo$[[e idƒe idƒndS(i˙˙˙˙(t generatorsN(t PKG_DIRECTORYt PY_COMPILEDt PY_SOURCEt PY_FROZEN(t StrictVersiont LooseVersiontRequiret find_moduletget_module_constanttextract_constantcBsYeZdZdd d d„Zd„Zd„Zd dd„Zd d„Zd d„Z RS( s7A prerequisite to building or installing a distributiontcCsu|djo|dj o t}n|dj o'||ƒ}|djo d}qXn|iitƒƒ|`dS(Nt __version__(tNoneRt__dict__tupdatetlocalstself(Rtnametrequested_versiontmodulethomepaget attributetformat((s6/usr/lib/python2.6/site-packages/setuptools/depends.pyt__init__ s    cCs,|idj od|i|ifS|iS(s0Return full package/distribution name, w/versions%s-%sN(RR R(R((s6/usr/lib/python2.6/site-packages/setuptools/depends.pyt full_namescCs@|idjp0|idjp t|ƒdjo ||ijS(s%Is 'version' sufficiently up-to-date?tunknownN(RR RtstrR(Rtversion((s6/usr/lib/python2.6/site-packages/setuptools/depends.pyt version_ok$s RcCsş|idjoSy8t|i|ƒ\}}}|o|iƒn|SWqctj odSXnt|i|i||ƒ}|dj o+||j o|idj o|i|ƒS|S(s×Get version number of installed module, 'None', or 'default' Search 'paths' for module. If not found, return 'None'. If found, return the extracted version attribute, or 'default' if no version attribute was specified, or the value cannot be determined without importing the module. The version is formatted according to the requirement's version format (if any), unless it is 'None' or the supplied 'default'. N(RR RRtcloset ImportErrorR R(Rtpathstdefaulttftptitv((s6/usr/lib/python2.6/site-packages/setuptools/depends.pyt get_version*s  *cCs|i|ƒdj S(s/Return true if dependency is present on 'paths'N(R&R (RR ((s6/usr/lib/python2.6/site-packages/setuptools/depends.pyt is_presentFscCs.|i|ƒ}|djotS|i|ƒS(s>Return true if dependency is present and up-to-date on 'paths'N(R&R tFalseR(RR R((s6/usr/lib/python2.6/site-packages/setuptools/depends.pyt is_currentKs N( t__name__t __module__t__doc__R RRRR&R'R)(((s6/usr/lib/python2.6/site-packages/setuptools/depends.pyR s   c csěddkl}ddkl}l}|d|iƒ}t|iƒ}d}d}x’||jo„||}||joN||d||dd|} |d 7}||jo| d }qVqŘnd } |d7}|| fVqVWd S( s>Yield '(op,arg)' pair for each operation in code object 'code'i˙˙˙˙(tarray(t HAVE_ARGUMENTt EXTENDED_ARGtbiiiiilN(R-tdisR.R/tco_codetlenR ( tcodeR-R.R/tbytesteoftptrt extended_argtoptarg((s6/usr/lib/python2.6/site-packages/setuptools/depends.pyt _iter_codeSs$   "     c Cs¤|idƒ}xŽ|o†|idƒ}ti||ƒ\}}\}}}} |tjo|pdg}|g}q|otd||fƒ‚qqW| S(s7Just like 'imp.find_module()', but with package supportt.iRsCan't find %r in %s(tsplittpoptimpRRR( RR tpartstpartR"tpathtsuffixtmodetkindtinfo((s6/usr/lib/python2.6/site-packages/setuptools/depends.pyR|s(  c Cs)y%t||ƒ\}}\}}}Wntj odSXzÄ|tjo |idƒti|ƒ} n”|tjoti |ƒ} nt|t jot |iƒ|dƒ} nK|t i jo#ti||||||fƒntt i ||dƒSWd|o|iƒnXt| ||ƒS(süFind 'module' by searching 'paths', and extract 'symbol' Return 'None' if 'module' does not exist on 'paths', or it does not define 'symbol'. If the module defines 'symbol' as a constant, return the constant. Otherwise, return 'default'.itexecN(RRR RtreadtmarshaltloadRR?tget_frozen_objectRtcompiletsystmodulest load_moduletgetattrRR ( RtsymbolR!R R"RBRCRDRER4((s6/usr/lib/python2.6/site-packages/setuptools/depends.pyR Ľs$%    #c Csś||ijodSt|iƒi|ƒ}d}d}d}|}xjt|ƒD]\\}} ||jo|i| }qR| |jo||jp ||jo|S|}qRWdS(sExtract the constant value of 'symbol' from 'code' If the name 'symbol' is bound to a constant value by the Python code object 'code', return that value. If 'symbol' is bound to an expression, return 'default'. Otherwise, return 'None'. Return value is based on the first assignment to 'symbol'. 'symbol' must be a global, or at least a non-"fast" local in the code block. That is, only 'STORE_NAME' and 'STORE_GLOBAL' opcodes are checked, and 'symbol' must be present in 'code.co_names'. iZiaidN(tco_namesR tlisttindexR;t co_consts( R4RQR!tname_idxt STORE_NAMEt STORE_GLOBALt LOAD_CONSTtconstR9R:((s6/usr/lib/python2.6/site-packages/setuptools/depends.pyR Îs   'tjavatcli((t __future__RRMR?RIRRRRtdistutils.versionRRt__all__RR;R RR R tplatformt startswithtremove(((s6/usr/lib/python2.6/site-packages/setuptools/depends.pyts$"I ) )) "#