AlkantarClanX12
Current Path : /opt/cloudlinux/venv/lib/python3.11/site-packages/raven/__pycache__/ |
Current File : //opt/cloudlinux/venv/lib/python3.11/site-packages/raven/__pycache__/versioning.cpython-311.pyc |
� �܋f� � �D � d dl mZ d dlZd dlmZ ddlmZ dZd d�Z d� Z dS ) � )�absolute_importN)� text_type� )�InvalidGitRepository)� fetch_git_sha�fetch_package_versionc � � |s�t j � | dd� � }t j � |� � st d| ��� � �t |d� � 5 }t |� � � � � � � � }ddd� � n# 1 swxY w Y |� d� � r6|dd� }t j j | dg|� d� � �R � }n%|S t j � | dd d |� � }t j � |� � �s?t j � t j � | d� � � � st | �d�� � �t j � | dd� � }t j � |� � r�t |� � 5 }|D ]r}|� � � }|rZ|dd � dvrN |� dd � � \ }} n# t $ r Y �Kw xY w| |k rt |� � c cddd� � S �s ddd� � n# 1 swxY w Y t d|�d�� � �t |� � 5 }t |� � � � � � � � cddd� � S # 1 swxY w Y dS )z6 >>> fetch_git_sha(os.path.dirname(__file__)) z.git�HEADz+Cannot identify HEAD for git repository at �rNzref: � �/�refs�headsz1 does not seem to be the root of a git repositoryzpacked-refsr )�#�^� zUnable to find ref to head "z" in repository) �os�path�join�existsr �openr �read�strip� startswith�split�rstrip� ValueError) r �head� head_path�fp� revision_file�packed_file�fh�line�revision�refs �G/opt/cloudlinux/venv/lib64/python3.11/site-packages/raven/versioning.pyr r s� � � � J��G�L�L��v�v�6�6� ��w�~�~�i�(�(� K�&�&�CG�4�I�K� K� K� �)�S� !� !� 0�R��R�W�W�Y�Y�'�'�-�-�/�/�D� 0� 0� 0� 0� 0� 0� 0� 0� 0� 0� 0���� 0� 0� 0� 0� �?�?�7�#�#� �����8�D��G�L��f��#�z�z�#���� � �M�M� �K�����T�6�6�7�D�I�I� � �7�>�>�-�(�(� G��w�~�~�b�g�l�l�4��8�8�9�9� Q�&�IM���O�Q� Q� Q� �g�l�l�4���?�?�� �7�>�>�+�&�&� 7��k�"�"� 7�b�� 7� 7�D��;�;�=�=�D�� 7��R�a�R�� � :� :�%�,0�J�J�s�A�,>�,>�M�H�c�c��)� %� %� %�$�H�%�����$�;�;�#,�X�#6�#6�6�6� 7� 7� 7� 7� 7� 7� 7� 7��7� 7� 7� 7� 7� 7� 7� 7� 7� 7� 7� 7���� 7� 7� 7� 7� #�"�?C�t�t�E�G� G� G� �m� � � ,��������#�#�)�)�+�+�,� ,� ,� ,� ,� ,� ,� ,� ,� ,� ,� ,���� ,� ,� ,� ,� ,� ,s` �%4B%�%B)�,B)�'I!�H �I!� H-�*I!�,H-�-I!�I!�!I%�(I%�3K�K�Kc � � ddl }n# t $ r t d� � �w xY w|� | � � }|j S )z- >>> fetch_package_version('sentry') r Nz5pkg_resources is not available on this Python install)� pkg_resources�ImportError�NotImplementedError�get_distribution�version)� dist_namer) �dists r'