/
setup.py
60 lines (54 loc) 路 1.89 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
#!/usr/bin/env python3
import re
import os.path
import sys
from setuptools import setup
from pip.req import parse_requirements
if sys.version_info < (3, 6):
sys.exit('Python 3.6+ is required. Ancient Python is unsupported.')
here = os.path.abspath(os.path.dirname(__file__))
readme_path = os.path.join(here, 'README.md')
with open(readme_path, 'r') as readme_file:
readme = readme_file.read()
# Borrowed from https://github.com/Gandi/gandi.cli/blob/master/setup.py
version_path = os.path.join(here, 'wb2k.py')
with open(version_path, 'r') as version_file:
version = re.compile(r".*__version__ = '(.*?)'",
re.S).match(version_file.read()).group(1)
install_reqs = [str(r.req) for r in parse_requirements('requirements.txt', session=False)]
dev_reqs = [str(r.req) for r in parse_requirements('dev-requirements.txt', session=False)]
setup(
name='wb2k',
version=version,
description='Welcome new folks to #general.',
long_description=readme,
author='Reilly Tucker Siemens',
author_email='reilly@tuckersiemens.com',
url='https://github.com/reillysiemens/wb2k',
install_requires=install_reqs,
license='ISCL',
zip_safe=False,
py_modules=['layabout', 'wb2k'],
keywords='welcome bot Slack',
classifiers=[
'Development Status :: 2 - Pre-Alpha',
'Environment :: Console',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: ISC License (ISCL)',
'Natural Language :: English',
'Operating System :: POSIX :: Linux',
'Operating System :: POSIX :: BSD :: FreeBSD',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3 :: Only',
],
test_suite='tests',
tests_require=dev_reqs,
extras_require={
'dev': dev_reqs,
},
entry_points={
'console_scripts': [
'wb2k=wb2k:cli',
],
},
)