-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathsetup.py
35 lines (28 loc) · 1.02 KB
/
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
31
32
33
34
35
import subprocess
import os
from setuptools import setup
version_py = os.path.join(os.path.dirname(__file__), 'FoamMon/version.py')
try:
version_git = subprocess.check_output(["git", "describe"], universal_newlines=True).rstrip()
except:
with open(version_py, 'w') as fh:
version_git = open(version_py).read().strip().split('=')[-1].replace('"','')
version_msg = "# Do not edit this file, pipeline versioning is governed by git tags"
with open(version_py, 'w') as fh:
fh.write(version_msg + os.linesep + "__version__='{}'".format(version_git))
package_name = 'FoamMon'
config = {
'author' : 'Gregor Olenik',
'author_email' : 'go@hpsim.de',
'description' : '',
'license' : 'MIT',
'version' : version_git,
'packages' : ["FoamMon"],
'install_requires' : [
'docopt',
'colorama',
'urwid',
],
'name' : 'foamMon',
'scripts': ["bin/foamMon"]}
setup(**config)