Hacked By AnonymousFox

Current Path : /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: ��/�refsZheadsz3%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�line�revision�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�NotImplementedError�get_distribution�version)�	dist_name�distr r r!rIs
r)N)
�
__future__r�os.pathrr"�ImportErrorZraven.utils.compatr�
exceptionsr�__all__rrr r r r!�<module>s

8

Hacked By AnonymousFox1.0, Coded By AnonymousFox