Commit df1b1353 authored by Johan Bloemberg's avatar Johan Bloemberg

automatically determine version

parent ff07170a
from subprocess import check_output
from setuptools import find_packages, setup
def get_git_version():
"""Determine current version number from nearest git tag."""
try:
version = check_output(["git", "describe", "--tags", "--abbrev=0"]).rstrip().decode()
develop = bool(check_output(["git", "status", "--porcelain"]).strip())
if develop:
return version + '.dev'
else:
return version
except:
return '0.0.0'
setup(
name='failmap-admin',
version='0.1',
version=get_git_version(),
packages=find_packages(),
install_requires=open('requirements.txt').readlines(),
entry_points={
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment