Skip to content
This repository has been archived by the owner on Oct 31, 2022. It is now read-only.
/ version.py Public archive
forked from Changaco/version.py

Automatic version numbers for git-based python projects

Notifications You must be signed in to change notification settings

mikejarrett/version.py

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 

Repository files navigation

version.py saves you from having to hard-code the version number of your project by getting it from git tags (directly or indirectly).

The tags that are considered to be version numbers are those that start with a digit.

To use the script, simply copy it into your project and call get_version() in your setup.py file:

from version import get_version

setup(
    ...
    version=get_version(),
    ...
)

You need to distribute the version.py file in your sdist packages by adding the following line in the MANIFEST.in file:

include version.py

For the script to work within git archives you need to add the following line to the .gitattributes file:

version.py  export-subst

Compatibility: python 3.x and 2.7

Licence: CC0 Public Domain Dedication

About

Automatic version numbers for git-based python projects

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%