ok

Mini Shell

Direktori : /opt/alt/python27/lib/python2.7/site-packages/setuptools/
Upload File :
Current File : //opt/alt/python27/lib/python2.7/site-packages/setuptools/depends.pyo

�
0��`c@s�ddlZddlZddlZddlmZmZmZmZddlmZddl	m
Z
ddddgZddd	��YZd
�Z
dd�Zddd�Zdd
�Zd�Ze�dS(i����N(t
PKG_DIRECTORYtPY_COMPILEDt	PY_SOURCEt	PY_FROZEN(t
StrictVersion(tsixtRequiretfind_moduletget_module_constanttextract_constantcBsYeZdZdd	d	d�Zd�Zd�Zd	dd�Zd	d�Zd	d�Z	RS(
s7A prerequisite to building or installing a distributiontcCsn|dkr!|dk	r!t}n|dk	rQ||�}|dkrQd}qQn|jjt��|`dS(Nt__version__(tNoneRt__dict__tupdatetlocalstself(Rtnametrequested_versiontmodulethomepaget	attributetformat((sC/opt/alt/python27/lib/python2.7/site-packages/setuptools/depends.pyt__init__s	cCs*|jdk	r#d|j|jfS|jS(s0Return full package/distribution name, w/versions%s-%sN(RRR(R((sC/opt/alt/python27/lib/python2.7/site-packages/setuptools/depends.pyt	full_namescCs=|jdkp<|jdkp<t|�dko<||jkS(s%Is 'version' sufficiently up-to-date?tunknownN(RRRtstrR(Rtversion((sC/opt/alt/python27/lib/python2.7/site-packages/setuptools/depends.pyt
version_ok$sRcCs�|jdkr]y6t|j|�\}}}|r@|j�n|SWq]tk
rYdSXnt|j|j||�}|dk	r�||k	r�|jdk	r�|j|�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RRtclosetImportErrorRR(Rtpathstdefaulttftptitv((sC/opt/alt/python27/lib/python2.7/site-packages/setuptools/depends.pytget_version)s

'
cCs|j|�dk	S(s/Return true if dependency is present on 'paths'N(R%R(RR((sC/opt/alt/python27/lib/python2.7/site-packages/setuptools/depends.pyt
is_presentDscCs,|j|�}|dkrtS|j|�S(s>Return true if dependency is present and up-to-date on 'paths'N(R%RtFalseR(RRR((sC/opt/alt/python27/lib/python2.7/site-packages/setuptools/depends.pyt
is_currentHsN(
t__name__t
__module__t__doc__RRRRR%R&R((((sC/opt/alt/python27/lib/python2.7/site-packages/setuptools/depends.pyR
s
		ccs�ddlm}ddlm}m}|d|j�}t|j�}d}d}x�||kr�||}||kr�||d||dd|}	|d	7}||kr�tjd}
|	|
d
�}qVq�nd}	|d7}||	fVqVWdS(s>Yield '(op,arg)' pair for each operation in code object 'code'i����(tarray(t
HAVE_ARGUMENTtEXTENDED_ARGtbiiiiiiN(	R,tdisR-R.tco_codetlenRt
integer_typesR(tcodeR,R-R.tbytesteoftptrtextended_argtoptargt	long_type((sC/opt/alt/python27/lib/python2.7/site-packages/setuptools/depends.pyt
_iter_codePs$
"

	
c
Cs�|jd�}x�|r�|jd�}tj||�\}}\}}}}	|tkrv|pgdg}|g}q|rtd||f��qqW|	S(s7Just like 'imp.find_module()', but with package supportt.iRsCan't find %r in %s(tsplittpoptimpRRR(
RRtpartstpartR!tpathtsuffixtmodetkindtinfo((sC/opt/alt/python27/lib/python2.7/site-packages/setuptools/depends.pyRrs	(c
Csy%t||�\}}\}}}Wntk
r9dSXz�|tkrh|jd�tj|�}	n�|tkr�tj	|�}	no|t
kr�t|j�|d�}	nH|tj
kr�tj||||||f�nttj
||d�SWd|r|j�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_objectRtcompiletsystmodulestload_moduletgetattrRR	(
RtsymbolR RR!RCRDRERFR4((sC/opt/alt/python27/lib/python2.7/site-packages/setuptools/depends.pyR�s$%

"c
Cs�||jkrdSt|j�j|�}d}d}d}|}xdt|�D]V\}}	||krx|j|	}qP|	|kr�||ks�||kr�|S|}qPWdS(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(
R4RRR tname_idxt
STORE_NAMEtSTORE_GLOBALt
LOAD_CONSTtconstR9R:((sC/opt/alt/python27/lib/python2.7/site-packages/setuptools/depends.pyR	�s
$cCsXtjjd�r&tjdkr&dSd}x%|D]}t�|=tj|�q3WdS(s�
    Patch the globals to remove the objects not available on some platforms.

    XXX it'd be better to test assertions about bytecode instead.
    tjavatcliNR	R(R	R(RNtplatformt
startswithtglobalst__all__tremove(tincompatibleR((sC/opt/alt/python27/lib/python2.7/site-packages/setuptools/depends.pyt_update_globals�s"

((RNR@RJRRRRtdistutils.versionRtsetuptools.externRRaRR<RRRR	Rd(((sC/opt/alt/python27/lib/python2.7/site-packages/setuptools/depends.pyt<module>s"C	"##	

Zerion Mini Shell 1.0