forked from Kopano-dev/grapi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
55 lines (45 loc) · 1.25 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# SPDX-License-Identifier: AGPL-3.0-or-later
import os
import subprocess
from setuptools import find_packages, setup
install_requires = [
'bjoern>=2.2.2',
'bsddb3',
'falcon==1.4.1',
'jsonschema>=2.5.0',
'python-dateutil',
'pytz',
'requests',
'setproctitle',
'tzlocal',
'ujson>=1.35',
'validators'
]
version = '0.0.0+unreleased'
here = os.path.abspath(os.path.dirname(__file__))
if os.path.exists(os.path.join(here, '.version')):
with open(os.path.join(here, '.version'), 'r') as version_file:
version = version_file.read().strip()
elif os.path.exists(os.path.join(here, '.git')):
cmd = 'git describe --tags --always --dirty --match=v*'
v = subprocess.check_output(cmd.split(' '), cwd=here).decode('utf-8').replace('-', '+', 1)
if v.startswith('v'):
v = v[1:]
version = v.strip()
setup(
name='grapi',
version=version,
description='',
long_description='',
author='Kopano',
author_email='development@kopano.io',
license='AGPL',
install_requires=install_requires,
packages=find_packages(include=['grapi', 'grapi.*']),
zip_safe=False,
entry_points={
'console_scripts': [
'kopano-grapi-mfr = grapi.mfr.__main__:main'
]
}
)