-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
39 lines (31 loc) · 975 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
31
32
33
34
35
36
37
38
39
#!/usr/bin/env python3
from setuptools import setup
from subprocess import Popen, PIPE
import os
def git_describe():
if not os.path.isdir('.git'):
raise ValueError('.git not found. Be sure to be inside the git repository.')
try:
p = Popen(['git', 'describe', '--tags', '--dirty', '--always'], stdout=PIPE)
except EnvironmentError:
print('ERROR: unable to run git. Are you sure it is installed?')
raise
git_describe_stdout = p.communicate()[0].decode().strip()
return git_describe_stdout
setup(
name='fluxons',
version='0.1+' + git_describe(),
description='',
long_description='',
url='https://github.com/franalbani/fluxons',
author='Francisco Albani',
license='GNU GPLv3.0',
author_email='',
classifiers=[
'Environment :: Console',
'Programming Language :: Python',
'Topic :: Utilities',
],
packages=['fluxons'],
install_requires=['attrs'],
)