1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
5 PYTHON_COMPAT=( python{2_7,3_6,3_7} )
9 MY_PV="${PV:0:4}-${PV:4:2}-${PV:6:2}"
11 MY_P="${MY_PN}-${MY_PV}"
13 if [[ ${PV} == "99999999" ]]; then
14 EGIT_REPO_URI="https://github.com/ProgVal/${MY_PN}.git"
19 SRC_URI="https://github.com/ProgVal/${MY_PN}/archive/master-${MY_PV}.tar.gz -> ${P}.tar.gz"
20 KEYWORDS="~amd64 ~x86"
21 S="${WORKDIR}/${MY_PN}-master-${MY_PV}"
24 DESCRIPTION="Python based extensible IRC infobot and channel bot"
25 HOMEPAGE="https://supybot.aperio.fr/"
31 dev-python/chardet[${PYTHON_USEDEP}]
32 dev-python/ecdsa[${PYTHON_USEDEP}]
33 dev-python/feedparser[${PYTHON_USEDEP}]
34 dev-python/python-dateutil[${PYTHON_USEDEP}]
35 dev-python/pytz[${PYTHON_USEDEP}]
36 dev-python/PySocks[${PYTHON_USEDEP}]
37 dev-python/sqlalchemy[${PYTHON_USEDEP}]
38 crypt? ( dev-python/python-gnupg[${PYTHON_USEDEP}] )
39 ssl? ( dev-python/pyopenssl[${PYTHON_USEDEP}] )
41 !net-irc/supybot-plugins
44 test? ( $(python_gen_cond_dep 'dev-python/mock[${PYTHON_USEDEP}]' python2_7) )"
46 RESTRICT="!test? ( test )"
49 if [[ ${PV} == "99999999" ]]; then
57 if python_is_python3; then
58 einfo "Removing the RSS plugin because of clashes between libxml2's Python3"
59 einfo "bindings and feedparser."
60 rm -rf "plugins/RSS" || die
64 python_install_all() {
65 distutils-r1_python_install_all
70 pushd "${T}" > /dev/null
71 PLUGINS_DIR="${BUILD_DIR}/lib/supybot/plugins"
73 # intermittent failure due to issues loading libsandbox.so from LD_PRELOAD
74 # runs successfully when running the tests on the installed system
75 EXCLUDE_PLUGINS+=( --exclude="${PLUGINS_DIR}/Unix" )
76 # Runs despite --no-network (GH #1392)
77 EXCLUDE_PLUGINS+=( --exclude="${PLUGINS_DIR}/Aka" )
78 "${PYTHON}" "${BUILD_DIR}"/scripts/supybot-test "${BUILD_DIR}/../test" \
79 --plugins-dir="${PLUGINS_DIR}" --no-network \
80 --disable-multiprocessing "${EXCLUDE_PLUGINS[@]}" \
81 || die "Tests failed under ${EPYTHON}"
86 elog "Complete user documentation is available at https://limnoria-doc.readthedocs.org/"
88 elog "Use supybot-wizard to create a configuration file."
89 elog "Run supybot </path/to/config> to use the bot."