forked from sopel-irc/sopel
-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
executable file
·83 lines (74 loc) · 2.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#!/usr/bin/env python
# coding=utf-8
from __future__ import unicode_literals, absolute_import, print_function, division
from sopel import __version__
import sys
try:
from setuptools import setup
except ImportError:
print(
'You do not have setuptools, and can not install Sopel. The easiest '
'way to fix this is to install pip by following the instructions at '
'http://pip.readthedocs.org/en/latest/installing.html\n'
'Alternately, you can run sopel without installing it by running '
'"python sopel.py"',
file=sys.stderr,
)
sys.exit(1)
if sys.version_info < (2, 7) or (
sys.version_info[0] > 3 and sys.version_info < (3, 3)):
# Maybe not the cleanest or best way to do this, but I'm tired of answering
# this fucking question, and if you get here you should go RTGDMFM.
raise ImportError('Sopel requires Python 2.7+ or 3.3+.')
if sys.version_info.major == 2:
print('Warning: Python 2.x is near end of life. Sopel support at that point is TBD.', file=sys.stderr)
def read_reqs(path):
with open(path, 'r') as fil:
return list(fil.readlines())
requires = read_reqs('requirements.txt')
if sys.version_info[0] < 3:
requires.append('backports.ssl_match_hostname')
dev_requires = requires + read_reqs('dev-requirements.txt')
classifiers = [
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'License :: Eiffel Forum License (EFL)',
'License :: OSI Approved :: Eiffel Forum License',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Topic :: Communications :: Chat :: Internet Relay Chat',
]
setup(
name='sopel',
version=__version__,
description='Simple and extendible IRC bot',
author='Elsie Powell',
author_email='[email protected]',
url='https://sopel.chat/',
long_description=(
"Sopel is a simple, extendible, easy-to-use IRC Utility bot, written "
"in Python. It's designed to be easy to use, easy to run, and easy to "
"make new features for."
),
# Distutils is shit, and doesn't check if it's a list of basestring
# but instead requires str.
packages=[str('sopel'), str('sopel.modules'),
str('sopel.cli'), str('sopel.config'), str('sopel.tools')],
classifiers=classifiers,
license='Eiffel Forum License, version 2',
platforms='Linux x86, x86-64',
install_requires=requires,
extras_require={'dev': dev_requires},
entry_points={
'console_scripts': [
'sopel = sopel.cli.run:main',
'sopel-config = sopel.cli.config:main',
]
},
)