forked from tinode/chat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
34 lines (30 loc) · 929 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
import setuptools
from subprocess import Popen, PIPE
with open('README.md', 'r') as fh:
long_description = fh.read()
setuptools.setup(
name="tinode-chatbot",
version=git_version(),
author="Tinode Authors",
author_email="[email protected]",
description="Tinode demo chatbot.",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/tinode/chat",
packages=setuptools.find_packages(),
install_requires=['grpcio>=1.15.0'],
classifiers=(
"Programming Language :: Python :: 3",
"License :: OSI Approved :: Apache 2.0",
"Operating System :: OS Independent",
),
)
def git_version():
try:
p = Popen(['git', 'describe', '--tags'],
stdout=PIPE, stderr=PIPE)
p.stderr.close()
line = p.stdout.readlines()[0]
return line.strip()
except:
return None