2 # -*- coding: utf-8 -*-
3 from distutils.core import setup
8 """Get version from version.in or latest git tag"""
9 version_file='version.in'
11 git_last_tag_cmd = ['git', 'describe', '--tags', '--abbrev=0']
14 if os.path.isfile(version_file):
15 version=file(version_file).readline().strip()
16 elif os.path.isdir('.git'):
17 popen = subprocess.Popen(git_last_tag_cmd, stdout=subprocess.PIPE)
18 out, ret = popen.communicate()
19 for line in out.split('\n'):
21 version = line.lstrip('release/')
24 pass # Failing is fine, we just can't print the version then
30 author='Gwenaël Rémond',
31 author_email='gremond@cadoles.com',
33 version=fetch_version(),
34 description='configuration management tool',
35 url='http://labs.libre-entreprise.org/projects/tiramisu',