ok

Mini Shell

Direktori : /opt/alt/python37/lib/python3.7/site-packages/raven/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib/python3.7/site-packages/raven/__pycache__/versioning.cpython-37.pyc

B

��Y(
�@slddlmZddlZyddlZWnek
r8dZYnXddlmZddlm	Z	dZ
ddd�Zd	d
�ZdS)�)�absolute_importN)�	text_type�)�InvalidGitRepository)�
fetch_git_sha�fetch_package_versionc

Cs�|s�tj�|dd�}tj�|�s.td|f��t|d��}t|�����}WdQRX|�	d�r�|dd�}tjj|df|�
d���}q�|Sntj�|dd	d
|�}tj�|��s�tj�tj�|d��s�td|f��tj�|dd�}tj�|��r�t|d���}xx|D]p}|��}|�s�q|dd
�dk�r.�qy|�
dd
�\}}	Wntk
�r\�wYnX|	|k�rt|�S�qWWdQRXtd|f��t|d�}zt|�����S|�
�XdS)z6
    >>> fetch_git_sha(os.path.dirname(__file__))
    z.gitZHEADz-Cannot identify HEAD for git repository at %s�rNzref: ��/ZrefsZheadsz3%s does not seem to be the root of a git repositoryzpacked-refsr)�#�^� z-Unable to find ref to head "%s" in repository)�os�path�join�existsr�openr�read�strip�
startswith�split�rstrip�
ValueError�close)
r�headZ	head_path�fpZ
revision_fileZpacked_fileZfh�lineZrevision�ref�r�A/opt/alt/python37/lib/python3.7/site-packages/raven/versioning.pyrsL




rcCs tdkrtd��t�|�}|jS)z-
    >>> fetch_package_version('sentry')
    Nz5pkg_resources is not available on this Python install)�
pkg_resources�NotImplementedErrorZget_distribution�version)Z	dist_nameZdistrrrrIs
r)N)
Z
__future__rZos.pathrr �ImportErrorZraven.utils.compatr�
exceptionsr�__all__rrrrrr�<module>s

8

Zerion Mini Shell 1.0