-
Notifications
You must be signed in to change notification settings - Fork 171
/
setup.py
101 lines (88 loc) · 3.11 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
#!/usr/bin/env python
import os
import sys
from setuptools import setup, find_packages
from will import __name__ as PACKAGE_NAME
from will import VERSION
DESCRIPTION = "A friendly python hipchat bot"
ROOT_DIR = os.path.dirname(__file__)
SOURCE_DIR = os.path.join(ROOT_DIR)
REQS_DIR = os.path.join(ROOT_DIR, "will", "requirements")
install_requires = []
dependency_links = []
with open("requirements.txt", "r+") as f:
for line in f.readlines():
if line[0] == "-":
continue
install_requires.append(line.strip())
for req_file in ["base.txt", "slack.txt", "hipchat.txt", "rocketchat.txt"]:
with open(os.path.join(REQS_DIR, req_file), "r+") as f:
for line in f.readlines():
if (
(line.startswith("-") and not line.startswith("-e"))
or line.startswith("#")
):
continue
if "-e" in line:
line = line.replace("-e", "")
dependency_links.append(line)
line = line.split("#")[-1].split("=")[-1]
install_requires.append(line.strip())
tests_require = [
'mock',
'pytest==6.2.2',
'pytest-cov',
'pytest-runner',
'pytest-mock',
'freezegun'
]
setup_requires = []
needs_pytest = set(('pytest', 'test', 'ptr')).intersection(sys.argv)
if needs_pytest:
setup_requires.append('pytest-runner')
try:
import pypandoc
long_description = pypandoc.convert('README.md', 'rst')
except (IOError, ImportError, OSError, RuntimeError):
try:
import os
long_description = open(os.path.join(os.path.dirname(__file__), 'README.md')).read()
except:
long_description = DESCRIPTION + '\n'
setup(
name=PACKAGE_NAME,
description=DESCRIPTION,
long_description=long_description,
author="Steven Skoczen",
author_email="[email protected]",
url="https://github.com/skoczen/will",
version=VERSION,
download_url=['https://github.com/skoczen/will/tarball/%s' % VERSION, ],
install_requires=install_requires,
dependency_links=dependency_links,
setup_requires=setup_requires,
tests_require=tests_require,
packages=find_packages(),
include_package_data=True,
keywords=["chatbot", "bot", "ai", "slack", "hipchat", "rocketchat", "stride"],
classifiers=[
"Programming Language :: Python",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Development Status :: 4 - Beta",
"Environment :: Web Environment",
"Intended Audience :: Developers",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Communications :: Chat",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Framework :: Robot Framework",
"Framework :: Robot Framework :: Library",
"Framework :: Robot Framework :: Tool",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 3",
],
entry_points={
'console_scripts': ['generate_will_project = will.scripts.generate_will_project:main'],
},
)