-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
30 lines (25 loc) · 855 Bytes
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
from setuptools import setup
import subprocess
def get_version():
try:
with open('version.txt', 'r') as version_file:
version = version_file.readline().strip()
except FileNotFoundError as e:
with open('build.txt', "r") as buildno_file:
build_no = buildno_file.read().strip()
commande_git_version = ['git', 'name-rev', '--name-only', 'HEAD']
output_process = subprocess.run(commande_git_version, stdout=subprocess.PIPE)
version = output_process.stdout.decode('utf8').strip()
version = '%s.%s' % (version, build_no)
print("Version: %s" % (version))
return version
setup(
name='millegrilles.acteur',
version='%s' % get_version(),
packages=['acteur'],
url='',
license='',
author='Mathieu Dugre',
author_email='',
description=''
)