
Æ|jñ	  ã               @   sö   d  Z  d d l Z d d l Z d d l m Z y; d d l m Z m Z d a	 d a
 e d d d � „  Z Wnq e k
 rÜ e e j e f Z e e d f Z d	 d
 e e e e e d d d � „ Z e d d d � „  Z Yn Xe d d d � „  Z d S)ze
certifi.py
~~~~~~~~~~

This module returns the installation location of cacert.pem or its contents.
é    N)ÚUnion)ÚpathÚ	read_text)Úreturnc               C   s1   t  d  k r- t d d ƒ a t t j ƒ  ƒ a  t  S)NÚcertifiz
cacert.pem)Ú_CACERT_PATHÚget_pathÚ_CACERT_CTXÚstrÚ	__enter__© r   r   ú//tmp/pip-build-1hwfuv5s/certifi/certifi/core.pyÚwhere   s    r   zos.PathLikezutf-8Ústrict)ÚpackageÚresourceÚencodingÚerrorsr   c          	   C   s0   t  t ƒ  d d | ƒ� } | j ƒ  SWd  QRXd  S)NÚrr   )Úopenr   Úread)r   r   r   r   Údatar   r   r   r   4   s    r   c              C   s%   t  j j t ƒ }  t  j j |  d ƒ S)Nz
cacert.pem)Úosr   ÚdirnameÚ__file__Újoin)Úfr   r   r   r   ?   s    c               C   s   t  d d d d ƒS)Nr   z
cacert.pemr   Úascii)r   r   r   r   r   ÚcontentsE   s    r   )Ú__doc__r   ÚtypesZtypingr   Zimportlib.resourcesr   r   r   r	   r   r
   r   ÚImportErrorÚ
ModuleTypeÚPackageÚResourcer   r   r   r   r   Ú<module>   s    	