1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python{2_7,3_4} )
10 MY_PV="${PV:0:4}-${PV:4:2}-${PV:6:2}"
12 MY_P="${MY_PN}-${MY_PV}"
14 if [[ ${PV} == "99999999" ]]; then
15 EGIT_REPO_URI="git://github.com/ProgVal/Limnoria.git"
20 SRC_URI="https://github.com/ProgVal/${MY_PN}/archive/master-${MY_PV}.tar.gz -> ${P}.tar.gz"
21 KEYWORDS="~amd64 ~x86"
22 S="${WORKDIR}/${MY_PN}-master-${MY_PV}"
25 DESCRIPTION="Python based extensible IRC infobot and channel bot"
26 HOMEPAGE="http://supybot.aperio.fr/"
32 dev-python/chardet[${PYTHON_USEDEP}]
33 dev-python/ecdsa[${PYTHON_USEDEP}]
34 dev-python/feedparser[${PYTHON_USEDEP}]
35 dev-python/python-dateutil[${PYTHON_USEDEP}]
36 dev-python/pytz[${PYTHON_USEDEP}]
37 dev-python/PySocks[${PYTHON_USEDEP}]
38 dev-python/sqlalchemy[${PYTHON_USEDEP}]
39 crypt? ( dev-python/python-gnupg[${PYTHON_USEDEP}] )
40 ssl? ( dev-python/pyopenssl[${PYTHON_USEDEP}] )
42 !net-irc/supybot-plugins
45 test? ( $(python_gen_cond_dep 'dev-python/mock[${PYTHON_USEDEP}]' python2_7) )"
48 if [[ ${PV} == "99999999" ]]; then
56 distutils-r1_python_prepare
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"
72 # recommended by upstream, unknown random failure
73 EXCLUDE_PLUGINS=( --exclude="${PLUGINS_DIR}/Scheduler" )
74 # recommended by upstream, unknown random failure
75 EXCLUDE_PLUGINS+=( --exclude="${PLUGINS_DIR}/Filter" )
76 # intermittent failure due to issues loading libsandbox.so from LD_PRELOAD
77 # runs successfully when running the tests on the installed system
78 EXCLUDE_PLUGINS+=( --exclude="${PLUGINS_DIR}/Unix" )
79 "${PYTHON}" "${BUILD_DIR}"/scripts/supybot-test "${BUILD_DIR}/../test" \
80 --plugins-dir="${PLUGINS_DIR}" --no-network \
81 --disable-multiprocessing "${EXCLUDE_PLUGINS[@]}" \
82 || die "Tests failed under ${EPYTHON}"
87 elog "Complete user documentation is available at https://limnoria-doc.readthedocs.org/"
89 elog "Use supybot-wizard to create a configuration file."
90 elog "Run supybot </path/to/config> to use the bot."