This repository was archived by the owner on Dec 22, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathsetup.py
79 lines (66 loc) · 2.33 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
from setuptools import setup, find_packages
module_name = 'vk_messages_bot'
def get_version(version_tuple):
# additional handling of a,b,rc tags, this can be simpler depending on your versioning scheme
if not isinstance(version_tuple[-1], int):
return '.'.join(
map(str, version_tuple[:-1])
) + version_tuple[-1]
return '.'.join(map(str, version_tuple))
# path to the packages __init__ module in project source tree
init = os.path.join(os.path.dirname(__file__), module_name, '__init__.py')
version_line = list(
filter(lambda l: l.startswith('VERSION'), open(init))
)[0]
# VERSION is a tuple so we need to eval its line of code.
# We could simply import it from the package but we
# cannot be sure that this package is importable before
# finishing its installation
VERSION = get_version(eval(version_line.split('=')[-1]))
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read()
requirements = [
"python-telegram-bot",
"requests",
"simplejson",
"jsonpickle",
]
setup(
name=module_name,
version=VERSION,
description="Telegram Bot that lets you receive messages from VK and reply to them",
long_description=readme + '\n\n' + history,
author="Roman Zaynetdinov",
author_email='[email protected]',
url='https://github.com/zaynetro/vk-messages-bot',
packages=find_packages(),
include_package_data=True,
install_requires=requirements,
python_requires='~=3.4',
license="MIT",
zip_safe=True,
keywords='vk vkontakte messages messenger telegram forward bot',
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: End Users/Desktop',
'Topic :: Communications :: Chat',
'Topic :: Internet',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Natural Language :: English',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
],
entry_points={
'console_scripts': [
'vk-messages-bot={}.__main__:main'.format(module_name),
],
},
)