1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
5 PYTHON_COMPAT=( python{2_7,3_4,3_5} )
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) )"
47 if [[ ${PV} == "99999999" ]]; then
55 distutils-r1_python_prepare
56 if python_is_python3; then
57 einfo "Removing the RSS plugin because of clashes between libxml2's Python3"
58 einfo "bindings and feedparser."
59 rm -rf "plugins/RSS" || die
63 python_install_all() {
64 distutils-r1_python_install_all
69 pushd "${T}" > /dev/null
70 PLUGINS_DIR="${BUILD_DIR}/lib/supybot/plugins"
71 # recommended by upstream, unknown random failure
72 EXCLUDE_PLUGINS=( --exclude="${PLUGINS_DIR}/Scheduler" )
73 # recommended by upstream, unknown random failure
74 EXCLUDE_PLUGINS+=( --exclude="${PLUGINS_DIR}/Filter" )
75 # intermittent failure due to issues loading libsandbox.so from LD_PRELOAD
76 # runs successfully when running the tests on the installed system
77 EXCLUDE_PLUGINS+=( --exclude="${PLUGINS_DIR}/Unix" )
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."