Python 3 build automation utility for managing Python project version labels
* Easily imported into any Code project
* Conveniently called by build logic to update version prior to deployment
Version: 0.6.7
--
- Python 3.6+.
- Libtools General utilities library
Each Python project you for which you wish to automate versioning must:
-
Store version number in a python module (file ending in '.py'). Module must contain
version
in the name. Examples:_version.py
version.py
-
Have a
DESCRIPTION.rst
file. File must contain a linePACKAGE = <dir containing python modules>
. Example:$ cat DESCRIPTION.rst
--
versionpro may be installed on Linux via pip, python package installer in one of 3 slightly different ways:
-
Global install versionpro for a single user:
$ pip3 install versionpro --user
-
Global install versionpro for all users (Linux):
$ sudo -H pip3 install versionpro
-
Installation for only 1 project (virtual environment install):
$ cd <project root> $ . p3_venv/bin/activate # virtual env = p3_venv $ pip install versionpro
Methods 1 and 2, one installation of versionpro will work for all local python 3 projects. For method 3, each python 3 project requires its own installation of versionpro.
$ versionpro --help
--
versionpro automatically extracts the current project name from either DESCRIPTION.rst or MANIFEST.ln artifacts. Before issuing any of the following commands, cd to the project root directory (top level).
-
Increment project version:
$ versionpro --update
-
Hard Set project version::
$ versionpro --update --force-set 1.8.1
-
Utilise pypi version instead of project version:
$ versionpro --update --pypi
-
Dry (test only) run, no actual version update:
$ versionpro --dryrun
--
All works contained herein copyrighted via below author unless work is explicitly noted by an alternate author.
- Copyright Blake Huber, All Rights Reserved.
- Software contained in this repo is licensed under the license agreement. You may display the license and copyright information by issuing the following command:
$ versionpro --version
Code is provided "as is". No liability is assumed by either the code's originating author nor this repo's owner for their use at AWS or any other facility. Furthermore, running function code at AWS may incur monetary charges; in some cases, charges may be substantial. Charges are the sole responsibility of the account holder executing code obtained from this library.
Additional terms may be found in the complete license agreement.