commit: 5e315faabfbd1714ef2426a107c3544c5db0fdd0
Author: Tiziano Müller <dev-zero <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 4 16:22:03 2016 +0000
Commit: Tiziano Müller <dev-zero <AT> gentoo <DOT> org>
CommitDate: Mon Apr 4 16:22:03 2016 +0000
URL: https://gitweb.gentoo.org/dev/dev-zero.git/commit/?id=5e315faa
net-im/errbot: disable py-2, fix tests and install
net-im/errbot/errbot-4.0.3.ebuild | 25 ++++++++++++++++++++-----
1 file changed, 20 insertions(+), 5 deletions(-)
diff --git a/net-im/errbot/errbot-4.0.3.ebuild
b/net-im/errbot/errbot-4.0.3.ebuild
index 8963ed1..891196d 100644
--- a/net-im/errbot/errbot-4.0.3.ebuild
+++ b/net-im/errbot/errbot-4.0.3.ebuild
@@ -4,7 +4,7 @@
EAPI=6
-PYTHON_COMPAT=( python{2_7,3_3,3_4,3_5} )
+PYTHON_COMPAT=( python{3_3,3_4,3_5} )
inherit distutils-r1 eutils user
@@ -32,8 +32,6 @@ RDEPEND="dev-python/webtest[${PYTHON_USEDEP}]
dev-python/pygments[${PYTHON_USEDEP}]
dev-python/pygments-markdown-lexer[${PYTHON_USEDEP}]
virtual/python-dnspython[${PYTHON_USEDEP}]
- $(python_gen_cond_dep
'dev-python/backports-functools-lru-cache[${PYTHON_USEDEP}]' python2_7)
- $(python_gen_cond_dep 'dev-python/configparser[${PYTHON_USEDEP}]'
python2_7)
$(python_gen_cond_dep 'dev-python/typing[${PYTHON_USEDEP}]' python3_3
python3_4)
hipchat? (
dev-python/hypchat[${PYTHON_USEDEP}]
@@ -43,7 +41,10 @@ RDEPEND="dev-python/webtest[${PYTHON_USEDEP}]
)
irc? ( dev-python/irc[${PYTHON_USEDEP}] )
qt4? ( dev-python/pyside[${PYTHON_USEDEP},X,webkit] )
- plugins? ( dev-vcs/git )
+ plugins? (
+ dev-vcs/git
+ dev-python/pip[${PYTHON_USEDEP}]
+ )
slack? ( dev-python/slackclient[${PYTHON_USEDEP}] )
telegram? ( dev-python/telegram-bot[${PYTHON_USEDEP}] )
xmpp? (
@@ -57,12 +58,20 @@ DEPEND="${RDEPEND}
dev-python/nose[${PYTHON_USEDEP}]
dev-python/pytest[${PYTHON_USEDEP}]
dev-python/pytest-xdist[${PYTHON_USEDEP}]
+ dev-python/flaky[${PYTHON_USEDEP}]
+ dev-python/pip[${PYTHON_USEDEP}]
)"
# NOTES:
# 1. Support for BOT_SENTRY option is missing, cause
# we do not have apropriate packages in portage yet
# 2. Internal web server is broken(dunno why :-()
+# 3. Python-2 is not supported directly, but rather
+# one would have to run errbot/py2conv.py to convert the source code
+# Dependencies would be as follows:
+# $(python_gen_cond_dep 'dev-python/3to2[${PYTHON_USEDEP}]' python2_7)
+# $(python_gen_cond_dep
'dev-python/backports-functools-lru-cache[${PYTHON_USEDEP}]' python2_7)
+# $(python_gen_cond_dep 'dev-python/configparser[${PYTHON_USEDEP}]'
python2_7)
pkg_setup() {
ebegin "Creating err group and user"
@@ -73,13 +82,19 @@ pkg_setup() {
python_prepare_all() {
# Remove config from requirements as it is NOT needed
+ # and do not install test subpackages.
sed -i \
-e "/install_requires/s/, 'config'//" \
+ -e "s|'tests'|'tests', 'tests.*'|" \
setup.py || die
distutils-r1_python_prepare_all
}
+python_test() {
+ py.test -v || die "Testing failed with ${EPYTHON}"
+}
+
python_install_all() {
distutils-r1_python_install_all
@@ -87,7 +102,7 @@ python_install_all() {
newconfd "${FILESDIR}"/errd.confd errd
dodir /etc/${PN}
- dodir /var/lib/${PN}
+ keepdir /var/lib/${PN}
keepdir /var/log/${PN}
fowners -R err:err /var/lib/${PN}
fowners -R err:err /var/log/${PN}