Your IP : 18.191.68.112


Current Path : /opt/alt/python34/lib/python3.4/site-packages/setuptools/__pycache__/
Upload File :
Current File : //opt/alt/python34/lib/python3.4/site-packages/setuptools/__pycache__/depends.cpython-34.pyc

�
M�ReM�@sddlmZddlZddlZddlZddlmZmZmZmZddl	m
Z
mZddddgZGd	d�d�Z
d
d�Zddd�Zdddd�Zddd�Zejjd�s�ejdkr[[ejd�ejd�ndS)�)�
generatorsN)�
PKG_DIRECTORY�PY_COMPILED�	PY_SOURCE�	PY_FROZEN)�
StrictVersion�LooseVersion�Require�find_module�get_module_constant�extract_constantc@sseZdZdZddddd�Zdd�Zdd	�Zdd
dd�Zdd
d�Zddd�Z	dS)r	z7A prerequisite to building or installing a distribution�NcCsn|dkr!|dk	r!t}n|dk	rQ||�}|dkrQd}qQn|jjt��|`dS)N�__version__)r�__dict__�update�locals�self)r�name�requested_version�moduleZhomepage�	attribute�format�r�-/tmp/pip-l4uy7dan-build/setuptools/depends.py�__init__
s	zRequire.__init__cCs*|jdk	r#d|j|jfS|jS)z0Return full package/distribution name, w/versionNz%s-%s)rr)rrrr�	full_nameszRequire.full_namecCs=|jdkp<|jdkp<t|�dko<||jkS)z%Is 'version' sufficiently up-to-date?N�unknown)rr�strr)r�versionrrr�
version_ok$szRequire.version_okrc
Cs�|jdkray6t|j|�\}}}|r@|j�n|SWqatk
r]dSYqaXnt|j|j||�}|dk	r�||k	r�|jdk	r�|j|�S|S)a�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
r�close�ImportErrorrr)r�paths�default�f�p�i�vrrr�get_version*s

'
zRequire.get_versioncCs|j|�dk	S)z/Return true if dependency is present on 'paths'N)r()rr"rrr�
is_presentFszRequire.is_presentcCs,|j|�}|dkrdS|j|�S)z>Return true if dependency is present and up-to-date on 'paths'NF)r(r)rr"rrrr�
is_currentKszRequire.is_current)
�__name__�
__module__�__qualname__�__doc__rrrr(r)r*rrrrr	
sc
cs�ddlm}ddlm}m}|d|j�}t|j�}d}d}x�||kr�||}||kr�||d||dd|}	|d7}||kr�|	td	�}qVq�nd
}	|d7}||	fVqVWd
S)z>Yield '(op,arg)' pair for each operation in code object 'code'r)�array)�
HAVE_ARGUMENT�EXTENDED_ARG�b����iN)r/Zdisr0r1�co_code�lenZ	long_type)
�coder/r0r1�bytes�eof�ptrZextended_arg�op�argrrr�
_iter_codeSs"
"
	
r?c
Cs�|jd�}x�|r�|jd�}tj||�\}}\}}}}	|tkrv|pgdg}|g}q|rtd||f��qqW|	S)z7Just like 'imp.find_module()', but with package support�.rrzCan't find %r in %s)�split�pop�impr
rr!)
rr"�parts�partr$�path�suffix�mode�kind�inforrrr
|s	(r3c
Cs!y%t||�\}}\}}}Wntk
r=dSYnXz�|tkrl|jd�tj|�}	n�|tkr�tj|�}	no|t	kr�t
|j�|d�}	nH|tjkr�tj
||||||f�nttj||d�SWd|r|j�nXt|	||�S)z�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'.N��exec)r
r!r�read�marshal�loadrrC�get_frozen_objectr�compile�sys�modules�load_module�getattrr r)
r�symbolr#r"r$rFrGrHrIr9rrrr�s$%
	
"c
Cs�||jkrdSt|j�j|�}d}d}d}|}xdt|�D]V\}}	||krx|j|	}qP|	|kr�||ks�||kr�|S|}qPWdS)aExtract 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'.
    N�Z�a�d)�co_names�list�indexr?�	co_consts)
r9rVr#Zname_idxZ
STORE_NAMEZSTORE_GLOBALZ
LOAD_CONST�constr=r>rrrr�s
$�java�cli���ra)�
__future__rrRrCrNrrrr�distutils.versionrr�__all__r	r?r
rr�platform�
startswith�removerrrr�<module>s$"I)))"!


?>