o $"bQ@s|dZddlmZmZddlmZmZddlmZddl Z ddl m Z e eGddde Ze eGd d d e ZdS) z( Application data stored by virtualenv. )absolute_importunicode_literals)ABCMetaabstractmethod)contextmanagerN) IS_ZIPAPPc@seZdZdZeddZeddZeddZedd Ze d d Z ed d Z e ddZ e ddZ eddZedddZeeddZeeddZdS)AppDataz9Abstract storage interface for the virtualenv applicationcCdS)zcalled before virtualenv exitsNselfr r :/usr/lib/python3/dist-packages/virtualenv/app_data/base.pyclosez AppData.closecCr )z1called when the user passes in the reset app dataNr r r r r resetrz AppData.resetcCtNNotImplementedErrorr pathr r r py_infozAppData.py_infocCrrrr r r r py_info_clearrzAppData.py_info_clearcCrrrr r r r can_update"rzAppData.can_updatecCrrr)r distributionfor_py_versionr r r embed_update_log&rzAppData.embed_update_logcCrrrr r r r house*rz AppData.housecCrrrr r r r transient.rzAppData.transientcCrrr)r rnamer r r wheel_image2rzAppData.wheel_imageNccsHtr||| }|VWddS1swYdS|VdS)zHSome paths might be within the zipapp, unzip these to a path on the diskN)rextract)r r to_folderresultr r r ensure_extracted6s " zAppData.ensure_extractedcCrrr)r rr#r r r r"?zAppData.extractcCrrrrr r r lockedDr&zAppData.lockedr)__name__ __module__ __qualname____doc__rrrrrpropertyrrrrr!rr%r"r'r r r r rs8           rc@sLeZdZeddZeddZeddZeddZeed d Z d S) ContentStorecCrrrr r r r existsLrzContentStore.existscCrrrr r r r readPrzContentStore.readcCrrr)r contentr r r writeTrzContentStore.writecCrrrr r r r removeXrzContentStore.removecCsdSrr r r r r r'\r&zContentStore.lockedN) r(r)r*rr.r/r1r2rr'r r r r r-Js    r-)r+ __future__rrabcrr contextlibrsixvirtualenv.infor add_metaclassobjectrr-r r r r s  ;