HEX
Server: Apache
System: Linux scp1.abinfocom.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: confeduphaar (1010)
PHP: 8.1.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //proc/self/root/lib/python3/dist-packages/incremental/__pycache__/update.cpython-38.pyc
U

��W�@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�4/usr/lib/python3/dist-packages/incremental/update.py�	_findPathsrc	Cs6i}|�d��d��}t|��|�W5QRX|dS)N�_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|���|� �D]�}|�!��s�q�|�"�}|}|j�rN|�#||�}|�#|�d�d|���d�|�d�d|���d��}|�#||�}|�#|�#dd�|�}|�#|�d�d|�d�d|���d��}||k�r�|	d|j$f�|�%d��}|�&|�W5QRX�q�|	d|j$�|�'d��%d�� }|�&t(|||f�d��W5QRXdS)N�utf8zOnly give --newversionzOnly give --devzOnly give --creater)�
parse_version��)�release_candidate�dev)r z6You need to issue a rc before updating the major/minorZNEXT�#zUpdating codebase to %s� �'�"s NEXTzUpdating %s�wzUpdating %s/_version.pyr))�os�getcwd�datetime�dateZtoday�type�str�encoderrrZ
pkg_resourcesrrZ_version�list�release�len�appendrZprer Zyear�_YEAR_STARTZmonthr�major�minor�micro�repr�splitZpublic�walk�isfileZ
getContent�replacerr�writer�_VERSIONPY_TEMPLATE)r
rZ
newversionZpatchZrcr ZcreateZ_dateZ_getcwdZ_printr�existingZ
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	rC�__main__)Z
__future__rrrZclickr&r(ZincrementalrZtwisted.python.filepathrr;r1rr�printr?ZcommandZargumentZoptionrC�__name__rrrr�<module>s2

�