o M=` @sddlmZmZmZddlZddlZddlZddlmZddl m Z dZ dZ ddZ d d Zddefd d Zeed ejdddejdddejdddejdddejdddejdddejdddddZedkr}edSdS))absolute_importdivisionprint_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__"] icCsJt|}|d|}||}|r|S|r!|Std)NsrczCan'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'.)rchildlowerisdir ValueError)pathpackagecwdsrc_dir current_dirr4/usr/lib/python3/dist-packages/incremental/update.py _findPathsrcCsPi}|dd}t||Wd|dS1swY|dS)N _version.pyr __version__)ropenexecread)r version_infofrrr_existing_version3s rc  Cs| stj} |s tj}t|tkr|d}|s t| |}nt |}|r(|s4|r,|s4|r0|s4|r8|r8t d|r<|sD|r@|sD|rH|rHt d|rL|s\|rP|s\|rT|s\|rX|s\|r`|r`t d|rddl m } t |} | |j} t| j}t|dkr|dt|dkr|dt|g|R| jr| jdnd| jr| jdnd| jr| jdndd }n|rt||jt|jd}|} n|r|st |} | jrt|| j| j| j| jd}nt||jt|jdd}ny|r|rd}nd}t |} t|| j| j| jd|}n]|r't |} | jdurd}n| jd}t|| j| j| j|d }n;|rKt |} | jdur7d}n| jd}t|| j| j| j| j|d }nt |} | jr^t|| j| j| j}nt d tt|d dddd dd}|d}t|dd dd}|d}t| dd dd}|d}| d|!|"D]}|#sq|$}|}| jr| ||}| |dd| !d|dd|!d}| ||}| | dd|}| |dd|dd|!d}||kr/| d|j%f|&d }|'|Wdn 1s*wYq| d|j%|(d&d}|'t)j*||ddWddS1sZwYdS)Nutf8zOnly give --newversionzOnly give --devzOnly give --creater) parse_version)release_candidatepostdev)r")r#z6You need to issue a rc before updating the major/minorNEXT#'"zUpdating codebase to %s '"s NEXTz Updating %swzUpdating %s/_version.pyr)r version_repr)+osgetcwddatetimedatetodaytypestrencoderrr pkg_resourcesrr_versionlistreleaselenappendrprer"r#year _YEAR_STARTmonthr!majorminormicroreprsplitreplacepublicwalkisfile getContentr rwriter_VERSIONPY_TEMPLATEformat)r r newversionpatchrcr"r#create_date_getcwd_printrexisting st_versionr8v_post_dev NEXT_reprNEXT_repr_bytesr,version_repr_bytesexisting_version_reprexisting_version_repr_bytesxoriginal_contentcontentrrrr_run<s*                    $             $r`r z--path)defaultz --newversionz--patchT)is_flagz--rcz--postz--devz--createcOst|i|S)N)r`)argskwargsrrrruns re__main__) __future__rrrclickr-r/ incrementalrtwisted.python.filepathrrJr=rrprintr`commandargumentoptionre__name__rrrrs8    B