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 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156
|
#!/usr/bin/env python
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
import os
import sys
from setuptools import find_packages, setup
py_version = sys.version_info[:2]
if py_version < (3, 8):
raise RuntimeError("Errbot requires Python 3.8 or later")
VERSION_FILE = os.path.join("errbot", "version.py")
deps = [
"webtest==3.0.0",
"setuptools==68.1.2",
"flask",
"requests==2.31.0",
"jinja2==3.1.2",
"pyOpenSSL==23.2.0",
"colorlog==6.7.0",
"markdown==3.4.4",
"ansi==0.3.6",
"Pygments==2.16.1",
"dulwich==0.21.5", # python implementation of git
"deepmerge==1.1.0",
]
if py_version < (3, 9):
deps.append("graphlib-backport==1.0.3")
src_root = os.curdir
def read_version():
"""
Read directly the errbot/version.py and gives the version without loading Errbot.
:return: errbot.version.VERSION
"""
variables = {}
with open(VERSION_FILE) as f:
exec(compile(f.read(), "version.py", "exec"), variables)
return variables["VERSION"]
def read(fname, encoding="ascii"):
return open(
os.path.join(os.path.dirname(__file__), fname), "r", encoding=encoding
).read()
if __name__ == "__main__":
VERSION = read_version()
args = set(sys.argv)
changes = read("CHANGES.rst", "utf8")
if changes.find(VERSION) == -1:
raise Exception("You forgot to put a release note in CHANGES.rst ?!")
if args & {"bdist", "bdist_dumb", "bdist_rpm", "bdist_wininst", "bdist_msi"}:
raise Exception("err doesn't support binary distributions")
packages = find_packages(src_root, include=["errbot", "errbot.*"])
setup(
name="errbot",
version=VERSION,
packages=packages,
entry_points={
"console_scripts": [
"errbot = errbot.cli:main",
]
},
install_requires=deps,
tests_require=["nose", "webtest", "requests"],
package_data={
"errbot": [
"backends/*.plug",
"backends/*.html",
"backends/styles/*.css",
"backends/images/*.svg",
"core_plugins/*.plug",
"core_plugins/*.md",
"core_plugins/templates/*.md",
"storage/*.plug",
"templates/initdir/example.py",
"templates/initdir/example.plug",
"templates/initdir/config.py.tmpl",
"templates/*.md",
"templates/new_plugin.py.tmpl",
],
},
extras_require={
"slack": [
"errbot-backend-slackv3==0.2.1",
],
"discord": [
"err-backend-discord==3.0.1",
],
"mattermost": [
"err-backend-mattermost==3.0.0",
],
"IRC": [
"irc==20.3.0",
],
"telegram": [
"python-telegram-bot==13.15",
],
"XMPP": [
"slixmpp==1.8.4",
"pyasn1==0.5.0",
"pyasn1-modules==0.3.0",
],
':sys_platform!="win32"': ["daemonize==2.5.0"],
},
author="errbot.io",
author_email="info@errbot.io",
description="Errbot is a chatbot designed to be simple to extend with plugins written in Python.",
long_description_content_type="text/x-rst",
long_description="".join([read("README.rst"), "\n\n", changes]),
license="GPL",
keywords="xmpp irc slack hipchat gitter tox chatbot bot plugin chatops",
url="http://errbot.io/",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Topic :: Communications :: Chat",
"Topic :: Communications :: Chat :: Internet Relay Chat",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
],
src_root=src_root,
platforms="any",
)
|