B
    pjÆ`&  ã               @   s   d Z G dd„ dƒZdS )z
(c) 2008-2013, holger krekel
c               @   sp   e Zd ZdZd Z Z Z Z Z Z	 Z
Zdd„ Zdd„ Zdd„ Zd	d
„ Zdd„ Zdd„ Zdd„ Zdd„ ZdS )ÚXSpecaG  Execution Specification: key1=value1//key2=value2 ...
    * keys need to be unique within the specification scope
    * neither key nor value are allowed to contain "//"
    * keys are not allowed to contain "="
    * keys are not allowed to start with underscore
    * if no "=value" is given, assume a boolean True value
    Nc             C   s¼   || _ i | _xª| d¡D ]œ}| d¡}|dkr:|d }}n|d |… ||d d …  }}|d dkrptd| ƒ‚|| jkrŠtd	 ||¡ƒ‚| d
¡r¨|| j|dd … < qt	| ||ƒ qW d S )Nz//ú=éÿÿÿÿTé   é    Ú_z%r not a valid XSpec keyzduplicate key: {!r} in {!r}zenv:é   )
Ú_specÚenvÚsplitÚfindÚAttributeErrorÚ__dict__Ú
ValueErrorÚformatÚ
startswithÚsetattr)ÚselfÚstringZkeyvalueÚiÚkeyÚvalue© r   ú,lib/python3.7/site-packages/execnet/xspec.pyÚ__init__   s    


zXSpec.__init__c             C   s   |d dkrt |ƒ‚d S )Nr   r   )r   )r   Únamer   r   r   Ú__getattr__'   s    zXSpec.__getattr__c             C   s   d  | j¡S )Nz<XSpec {!r}>)r   r   )r   r   r   r   Ú__repr__,   s    zXSpec.__repr__c             C   s   | j S )N)r   )r   r   r   r   Ú__str__/   s    zXSpec.__str__c             C   s
   t | jƒS )N)Úhashr   )r   r   r   r   Ú__hash__2   s    zXSpec.__hash__c             C   s   | j t|dd ƒkS )Nr   )r   Úgetattr)r   Úotherr   r   r   Ú__eq__5   s    zXSpec.__eq__c             C   s   | j t|dd ƒkS )Nr   )r   r    )r   r!   r   r   r   Ú__ne__8   s    zXSpec.__ne__c             C   s   | j d k	o| jd kS )N)ÚpopenÚchdir)r   r   r   r   Ú_samefilesystem;   s    zXSpec._samefilesystem)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r$   ZsshZsocketZpythonr%   ÚniceÚdont_write_bytecodeZ	execmodelr   r   r   r   r   r"   r#   r&   r   r   r   r   r      s    r   N)r*   r   r   r   r   r   Ú<module>   s   