Your IP : 216.73.216.213
B
,�?\%
� @ sd d Z ddlmZmZ ddlZddlZddlZddlmZ dZ dZ
dd � Zd
d� ZG dd
� d
e
�ZdS )z configuration � )�print_function�unicode_literalsN� )�tracez@^(?:[\w-]+-)?(?P<version>[vV]?\d+(?:\.\d+){0,2}[^\+]+)(?:\+.*)?$�version_schemec C sF | st } t�| �}|j�� }|jdks8|jdkrBd|krBt�d� |S )Nr r �versionzvExpected tag_regex to contain a single match group or a group named 'version' to identify the version part of any tag.)�DEFAULT_TAG_REGEX�re�compile�
groupindex�keys�groups�warnings�warn)�value�regex�group_names� r �F/opt/alt/python37/lib/python3.7/site-packages/setuptools_scm/config.py�_check_tag_regex
s
r c C sN |rBt j�| �r,| �|�s,t�d| |f � t j�t j�|�| �} t j�| �S )Nz2absolute root path '%s' overrides relative_to '%s') �os�path�isabs�
startswithr r �join�dirname�abspath)�root�relative_tor r r �_check_absolute_root s r c @ s� e Zd ZdZdZdZdZdZdZdZ dZ
dZdZddd�Z
edd� �Zedd � �Zejd
d � �Zedd� �Zejd
d� �Zedd� �Zejdd� �ZdS )�
Configurationz Global configuration model N�.c C s@ || _ d| _|| _t| _d| _d| _d | _d | _t | _
d | _d S )Nr! z
node-and-date� )�_relative_to�_rootr �DEFAULT_VERSION_SCHEMEr �local_scheme�write_to�write_to_template�parser � tag_regex�git_describe_command)�selfr r r r r �__init__4 s zConfiguration.__init__c C s | j S )N)�_absolute_root)r, r r r �
absolute_rootB s zConfiguration.absolute_rootc C s | j S )N)r# )r, r r r r F s zConfiguration.relative_toc C s( t | j|�| _|| _tdt| j�� d S )Nr )r r$ r. r# r �repr)r, r r r r r J s c C s | j S )N)r$ )r, r r r r P s zConfiguration.rootc C s( t || j�| _|| _tdt| j�� d S )Nr )r r# r. r$ r r0 )r, r r r r r T s c C s | j S )N)�
_tag_regex)r, r r r r* Z s zConfiguration.tag_regexc C s t |�| _d S )N)r r1 )r, r r r r r* ^ s )Nr! )�__name__�
__module__�__qualname__�__doc__r$ r r&