U
    |eC                     @  sh   d Z ddlmZ ddlmZmZ ddlmZ ddlm	Z	 G dd dedZ
G d	d
 d
edZd
dgZdS )z&Application data stored by virtualenv.    )annotations)ABCMetaabstractmethod)contextmanager)	IS_ZIPAPPc                   @  s   e Zd ZdZedd Zedd Zedd Zedd	 Ze	d
d Z
edd Ze	dd Ze	dd Zedd ZedddZeedd Zeedd ZdS )AppDataz:Abstract storage interface for the virtualenv application.c                 C  s   dS )zCalled before virtualenv exits.N selfr   r   </tmp/pip-unpacked-wheel-tuxcr54r/virtualenv/app_data/base.pyclose   s    zAppData.closec                 C  s   dS )z2Called when the user passes in the reset app data.Nr   r	   r   r   r   reset   s    zAppData.resetc                 C  s   t d S NNotImplementedErrorr
   pathr   r   r   py_info   s    zAppData.py_infoc                 C  s   t d S r   r   r	   r   r   r   py_info_clear   s    zAppData.py_info_clearc                 C  s   t d S r   r   r	   r   r   r   
can_update   s    zAppData.can_updatec                 C  s   t d S r   r   )r
   distributionfor_py_versionr   r   r   embed_update_log"   s    zAppData.embed_update_logc                 C  s   t d S r   r   r	   r   r   r   house&   s    zAppData.housec                 C  s   t d S r   r   r	   r   r   r   	transient*   s    zAppData.transientc                 C  s   t d S r   r   )r
   r   namer   r   r   wheel_image.   s    zAppData.wheel_imageNc              	   c  s.   t r$| ||}|V  W 5 Q R X n|V  dS )zISome paths might be within the zipapp, unzip these to a path on the disk.N)r   extract)r
   r   	to_folderresultr   r   r   ensure_extracted2   s    zAppData.ensure_extractedc                 C  s   t d S r   r   )r
   r   r   r   r   r   r   ;   s    zAppData.extractc                 C  s   t d S r   r   r   r   r   r   locked@   s    zAppData.locked)N)__name__
__module____qualname____doc__r   r   r   r   r   propertyr   r   r   r   r   r   r    r   r!   r   r   r   r   r      s6   








r   )	metaclassc                   @  sL   e Zd Zedd Zedd Zedd Zedd Zeed	d
 Z	dS )ContentStorec                 C  s   t d S r   r   r	   r   r   r   existsG   s    zContentStore.existsc                 C  s   t d S r   r   r	   r   r   r   readK   s    zContentStore.readc                 C  s   t d S r   r   )r
   contentr   r   r   writeO   s    zContentStore.writec                 C  s   t d S r   r   r	   r   r   r   removeS   s    zContentStore.removec                 C  s   d S r   r   r	   r   r   r   r!   W   s    zContentStore.lockedN)
r"   r#   r$   r   r)   r*   r,   r-   r   r!   r   r   r   r   r(   F   s   



r(   N)r%   
__future__r   abcr   r   
contextlibr   Zvirtualenv.infor   r   r(   __all__r   r   r   r   <module>   s   ;