-
Notifications
You must be signed in to change notification settings - Fork 3
/
setup.py
74 lines (61 loc) · 1.91 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
import io
import os
from setuptools import setup
from setuptools.command.test import test as TestCommand
import sys
import aslack
if sys.version_info < (3, 5):
err_msg = '{} requires Python 3.5 or above'.format(aslack.__name__)
raise RuntimeError(err_msg)
here = os.path.abspath(os.path.dirname(__file__))
def read(*filenames, **kwargs):
encoding = kwargs.get('encoding', 'utf-8')
sep = kwargs.get('sep', '\n')
buf = []
for filename in filenames:
with io.open(filename, encoding=encoding) as f:
buf.append(f.read())
return sep.join(buf)
long_description = read('README.rst')
class PyTest(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = ['--pylint', '--pylint-error-types=FEW']
self.test_suite = True
def run_tests(self):
import pytest
errcode = pytest.main(self.test_args)
sys.exit(errcode)
setup(
author=aslack.__author__,
author_email='[email protected]',
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3 :: Only',
'Topic :: Communications :: Chat',
],
cmdclass={'test': PyTest},
description=aslack.__doc__,
extras_require=dict(
examples=['atmdb>=0.1.3'],
),
install_requires=['aiohttp>=0.15.0,<0.21'],
license='License :: OSI Approved :: ISC License (ISCL)',
long_description=long_description,
name='aslack',
packages=['aslack', 'aslack.slack_bot'],
platforms='any',
tests_require=[
'asynctest',
'pylint>=1.5.3',
'pytest',
'pytest-asyncio',
'pytest-pylint',
],
url='http://github.com/textbook/aslack/',
version=aslack.__version__,
)