U
    [e                     @   s   d dl mZmZmZ d dlZd dlZd dlZd dlmZ d dl	m
Z
 dZdZdd Zd	d
 ZddefddZe edejdddejdddejdddejdddejdddejdddejddddd Zedkre  dS )    )absolute_importdivisionprint_functionN)Version)FilePathz"""
Provides {package} version information.
"""

# This file is auto-generated! Do not edit!
# Use `python -m incremental.update {package}` to change this file.

from incremental import Version

__version__ = {version_repr}
__all__ = ["__version__"]
i  c                 C   sN   t | }|d| }|| }| r6|S | rB|S tdd S )NsrczCan't find under `./src` or `./`. Check the package name is right (note that we expect your package name to be lower cased), or pass it using '--path'.)r   childlowerisdir
ValueError)pathpackagecwdsrc_dirZcurrent_dir r   T/var/www/html/services/stratfitenv/lib/python3.8/site-packages/incremental/update.py	_findPath   s    r   c              	   C   s6   i }|  dd}t| | W 5 Q R X |d S )N_version.pyr__version__)r   openexecread)r   version_infofr   r   r   _existing_version3   s    r   c              
   C   s  |	s
t j}	|stj }t| tkr.| d} |s@t|	 | }nt	|}|rP|sh|rX|sh|r`|sh|rp|rpt
d|rx|s|r|s|r|rt
d|r|s|r|s|r|s|r|s|r|rt
d|rpddlm} t|}||j}t|j}t|dkr|d t|dkr|d t| f||jr:|jd nd |jrN|jd nd |jrb|jd nd d	}nl|rt| |jt |jd}|}nH|r|st|}|jrt| |j|j|j|jd }nt| |jt |jdd}n|r"|rd}nd }t|}t| |j|j|jd |}n|rft|}|jd krBd}n
|jd }t| |j|j|j|d
}nv|rt|}|jd krd}n
|jd }t| |j|j|j|j|d}n.t|}|jrt| |j|j|j}nt
dtt| ddddd  dd}|d}t|dd  dd}|d}t|dd  dd}|d}|
d|!   |" D ]}|# s|qj|$ }|}|jr| ||}| | dd |! d | dd |! d }| ||}| | dd|}| | dd | dd |! d }||krj|
d|j%f  |&d}|'| W 5 Q R X qj|
d|j%  |(d&d }|'t)j*| |dd W 5 Q R X d S )Nutf8zOnly give --newversionzOnly give --devzOnly give --creater   )parse_version      )release_candidatepostdev)r!   )r"   z6You need to issue a rc before updating the major/minorZNEXT#'"zUpdating codebase to %s       '   "s    NEXTzUpdating %swzUpdating %s/_version.pyr   )r   version_repr)+osgetcwddatetimedatetodaytypestrencoder   r   r   pkg_resourcesr   r   _versionlistreleaselenappendr   prer!   r"   year_YEAR_STARTmonthr    majorminormicroreprsplitreplacepublicwalkisfileZ
getContentr   r   writer   _VERSIONPY_TEMPLATEformat)r   r   Z
newversionpatchrcr!   r"   createZ_dateZ_getcwdZ_printr   existingZ
st_versionr6   v_post_devZ	NEXT_reprZNEXT_repr_bytesr*   Zversion_repr_bytesZexisting_version_reprZexisting_version_repr_bytesxZoriginal_contentcontentr   r   r   r   _run<   s*   


	







$




 
rR   r   z--path)defaultz--newversionz--patchT)Zis_flagz--rcz--postz--devz--createc                  O   s
   t | |S )N)rR   )argskwargsr   r   r   run   s    
rV   __main__)
__future__r   r   r   Zclickr+   r-   incrementalr   Ztwisted.python.filepathr   rG   r;   r   r   printrR   commandargumentoptionrV   __name__r   r   r   r   <module>   s4   
 B