Handle running setup.py from non .git source

This commit is contained in:
Frank Hamand 2017-03-29 14:48:14 +01:00
parent 58578a8ff3
commit d77087efad
1 changed files with 4 additions and 1 deletions

View File

@ -9,7 +9,10 @@ from pip.req import parse_requirements
requirements = [str(req.req) for req in parse_requirements('requirements.txt', session=False)]
requirements_plugins = [str(req.req) for req in parse_requirements('requirements-plugins.txt', session=False)]
VERSION = subprocess.check_output(['git', 'describe', '--tags']).strip()
try:
VERSION = subprocess.check_output(['git', 'describe', '--tags']).strip()
except subprocess.CalledProcessError:
VERSION = '0.dev'
setup(
name='cabot',