setup.py: version number build from git describe
This commit is contained in:
parent
f74d98269b
commit
a9b2dd743e
12
setup.py
12
setup.py
|
@ -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/',
|
||||
|
|
Loading…
Reference in New Issue