관리-도구
편집 파일: markers.cpython-34.pyc
� M�Re� � @ s� d Z d d d g Z d d l Z d d l Z d d l Z d d l Z d d l Z e Z y d d l m Z Wn3 e k r� e j d k r� d d � Z n � Yn Xi e j d 6d e j d d � d 6e j j d d � d d 6e j d 6e j � d 6e j � d 6e � d 6d d 6Z xC e e j � � D]/ Z d e k r+e e e e j d d � <q+q+Wd d � Z Gd d � d e j � Z d d � Z d d � Z e j � Z d d � Z d d d � Z d S)!a� Interpret PEP 345 environment markers. EXPR [in|==|!=|not in] EXPR [or|and] ... where EXPR belongs to any of those: python_version = '%s.%s' % (sys.version_info[0], sys.version_info[1]) python_full_version = sys.version.split()[0] os.name = os.name sys.platform = sys.platform platform.version = platform.version() platform.machine = platform.machine() platform.python_implementation = platform.python_implementation() a free string, like '2.6', or 'win32' �default_environment�compile� interpret� N)�python_implementation�javac C s d S)N�Jython� r r r �-/tmp/pip-l4uy7dan-build/_markerlib/markers.pyr ! s r zsys.platformz%s.%s� �python_version� � �python_full_versionzos.namezplatform.versionzplatform.machinezplatform.python_implementation�extra�.�_c C s t t � S)z2Return copy of default PEP 385 globals dictionary.)�dict�_VARSr r r r r 8 s c @ s� e Z d Z d d � Z e j e j e j e j e j e j f Z e e j e j f 7Z e e j e j e j e j e j e j e j e j e j e j f 7Z d d � Z d d � Z d S)�ASTWhitelistc C s | | _ d S)N)� statement)�selfr r r r �__init__= s zASTWhitelist.__init__c C sL t | | j � s9 t d | j d | j d f � � n t j j | | � S)z-Ensure statement only contains allowed nodes.z)Not allowed in environment markers. %s %sr �^)� isinstance�ALLOWED�SyntaxErrorr � col_offset�ast�NodeTransformer�visit)r �noder r r r F s zASTWhitelist.visitc C s8 t j d | j j | j f | j � } t j | | � S)z&Flatten one level of attribute access.z%s.%s)r �Name�value�id�attr�ctx� copy_location)r r �new_noder r r �visit_AttributeN s (zASTWhitelist.visit_AttributeN)�__name__� __module__�__qualname__r r �Compare�BoolOp� Attributer! �Load�Strr �And�Or�Eq�Gt�GtE�In�Is�IsNot�Lt�LtE�NotEq�NotInr r( r r r r r <