forked from GrafeasGroup/tor_core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
90 lines (72 loc) · 2.08 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
import codecs
import os
import shlex
import sys
from setuptools import (
setup,
find_packages,
)
from setuptools.command.test import test as TestCommand
from tor_core import __version__
class PyTest(TestCommand):
# From: https://stackoverflow.com/a/43924004/1236035
user_options = [('pytest-args=', 'a', "Arguments to pass into py.test")]
def initialize_options(self):
TestCommand.initialize_options(self)
self.pytest_args = '--cov=tor_core'
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
import pytest
errno = pytest.main(shlex.split(self.pytest_args))
sys.exit(errno)
def long_description():
if not (os.path.isfile('README.md') and os.access('README.md', os.R_OK)):
return ''
with codecs.open('README.md', encoding='utf8') as f:
return f.read()
test_deps = [
'pytest',
'pytest-cov',
]
dev_helper_deps = [
'better-exceptions',
]
setup(
name='tor_core',
version=__version__,
description='Core functionality used across /r/TranscribersOfReddit bots',
long_description=long_description(),
url='https://github.com/GrafeasGroup/tor_core',
author='Joe Kaufeld',
author_email='joe.kaufeld@gmail.com',
license='MIT',
classifiers=[
'Development Status :: 1 - Planning',
'Intended Audience :: Developers',
'Topic :: Communications :: BBS',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
],
keywords='',
packages=find_packages(exclude=['test.*', '*.test.*', '*.test', 'test']),
zip_safe=True,
cmdclass={'test': PyTest},
test_suite='test',
extras_require={
'dev': test_deps + dev_helper_deps,
},
tests_require=test_deps,
install_requires=[
'praw==5.0.1',
'redis<3.0.0',
'sh',
'cherrypy',
'bugsnag',
'raven', # Sentry client
'slackclient'
],
)