Your IP : 216.73.216.213


Current Path : /opt/alt/python37/lib/python3.7/site-packages/incremental/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib/python3.7/site-packages/incremental/__pycache__/update.cpython-37.opt-1.pyc

B

�=Y�@s�ddlmZmZmZddlZddlZddlZddlmZddl	m
Z
dZdZdd�Z
d	d
�Zddefdd�Ze��e�d
�ejddd�ejddd�ejddd�ejddd�ejddd�ejddd�dd���������Zedkr�e�dS)�)�absolute_import�division�print_functionN)�Version)�FilePathz�"""
Provides %s version information.
"""

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

from incremental import Version

__version__ = %s
__all__ = ["__version__"]
i�cCsNt|�}|�d��|���}|�|���}|��r6|S|��rB|Std��dS)N�srcz�Can'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�cwdZsrc_dirZcurrent_dir�r�C/opt/alt/python37/lib/python3.7/site-packages/incremental/update.py�	_findPathsrc	Cs6i}|�d��d��}t|��|�WdQRX|dS)Nz_version.py�r�__version__)r�open�exec�read)r�version_info�frrr�_existing_version/src

Cs(|s
tj}|stj��}t|�tkr.|�d�}|s@t|�|�}nt	|�}|rP|s`|rX|s`|rh|rht
d��|rp|sx|r�|r�t
d��|r�|s�|r�|s�|r�|s�|r�|r�t
d��|�rBddlm}
t
|�}|
|�j}t|j�}
t|
�dkr�|
�d�t|
�dk�r|
�d�t|f|
�|j�r |jdnd|j�r4|jdndd	��}�n(|�rft||jt|jd�}|}�n|�r�|�s�t
|�}|j�r�t||j|j|j|jd�}nt||jt|jdd�}n�|�r�|�r�d}nd}t
|�}t||j|j|jd|�}nv|�r<t
|�}|jdk�rd}n
|jd}t||j|j|j|j|d
�}n.t
|�}|j�rbt||j|j|j�}nt
d��tt|ddd���d
�d}|�d�}t|��d
�d}|�d�}t|��d
�d}|�d�}|	d|����x|� �D]�}|�!��s��q�|�"�}|}|j�rR|�#||�}|�#|�d�d|���d�|�d�d|���d��}|�#||�}|�#|�#dd�|�}|�#|�d�d|�d�d|���d��}||k�r�|	d|j$f�|�%d��}|�&|�WdQRX�q�W|	d|j$�|�'d��%d�� }|�&t(|||f�d��WdQRXdS)N�utf8zOnly give --newversionzOnly give --devzOnly give --creater)�
parse_version��)�release_candidate�dev)rz6You need to issue a rc before updating the major/minorZNEXT�#zUpdating codebase to %s� �'�"s NEXTzUpdating %s�wzUpdating %s/_version.pyz_version.py))�os�getcwd�datetimeZdateZtoday�type�str�encoderrrZ
pkg_resourcesrrZ_version�list�release�len�appendrZprerZyear�_YEAR_STARTZmonthr�major�minor�micro�repr�splitZpublic�walk�isfileZ
getContent�replacerr�writer�_VERSIONPY_TEMPLATE)r
rZ
newversionZpatch�rcrZcreateZ_dateZ_getcwdZ_printrZexistingZ
st_versionr,�vZ_devZ	NEXT_reprZNEXT_repr_bytesZversion_reprZversion_repr_bytesZexisting_version_reprZexisting_version_repr_bytes�xZoriginal_contentZcontentrrrr�_run8s�





 





r=r
z--path)�defaultz--newversionz--patchT)Zis_flagz--rcz--devz--createcOs
t||�S)N)r=)�args�kwargsrrr�run�s	rA�__main__)Z
__future__rrrZclickr%r'ZincrementalrZtwisted.python.filepathrr9r/rr�printr=ZcommandZargumentZoptionrA�__name__rrrr�<module>s*

$