setup.py: version number build from git describe

This commit is contained in:
Thomas NOËL 2013-05-15 15:52:05 +02:00
parent f74d98269b
commit a9b2dd743e
1 changed files with 11 additions and 1 deletions

View File

@ -1,9 +1,19 @@
#!/usr/bin/python
from setuptools import setup, find_packages
import os
import subprocess
VERSION='0.1'
def get_version():
if os.path.exists('.git'):
p = subprocess.Popen(['git','describe','--dirty'], stdout=subprocess.PIPE)
result = p.communicate()[0]
return result.split()[0].replace('-','.')
return VERSION
setup(name='passerelle',
version='0.1',
version=get_version(),
license='AGPLv3',
description='',
url='https://dev.entrouvert.org/projects/passerelle/',