Skip to content

Instantly share code, notes, and snippets.

@cberner
cberner / gitversion.py
Created December 3, 2011 19:09 — forked from dcreager/version.py
Extract a setuptools version from the git repository
# -*- coding: utf-8 -*-
# Author: Douglas Creager <dcreager@dcreager.net>, Christopher Berner <christopherberner@gmail.com>
# This file is placed into the public domain.
# Calculates the current version number. This is the
# output of “git describe”.
#
# To use this script, simply import it your setup.py file, and use the
# results of get_git_version() as your package version:
#