commit:     c58d89d5f1dc63231baa5a0280664ffe6ec6af4a
Author:     Eli Schwartz <eschwartz93 <AT> gmail <DOT> com>
AuthorDate: Tue Oct 17 23:57:59 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Oct 25 02:22:22 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c58d89d5

net-irc/limnoria: drop unneeded test dependency on mock

With this, we can remove the "test" USE flag altogether.

Since 2015, the stdlib mock has been used if available:
https://github.com/progval/Limnoria/commit/758dc6d57f4aa0c3768f494715445d789a5cd6d8

(In 20230211 even the python2 fallback code is removed.)

Signed-off-by: Eli Schwartz <eschwartz93 <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 ...99999999.ebuild => limnoria-20221116-r1.ebuild} | 28 ++++++++++------------
 net-irc/limnoria/limnoria-99999999.ebuild          |  4 +---
 2 files changed, 14 insertions(+), 18 deletions(-)

diff --git a/net-irc/limnoria/limnoria-99999999.ebuild 
b/net-irc/limnoria/limnoria-20221116-r1.ebuild
similarity index 76%
copy from net-irc/limnoria/limnoria-99999999.ebuild
copy to net-irc/limnoria/limnoria-20221116-r1.ebuild
index 9f3c9f0c7e1d..3da735a7e56b 100644
--- a/net-irc/limnoria/limnoria-99999999.ebuild
+++ b/net-irc/limnoria/limnoria-20221116-r1.ebuild
@@ -4,7 +4,7 @@
 EAPI=7
 
 PYTHON_COMPAT=( python3_{9..11} )
-DISTUTILS_USE_SETUPTOOLS=no
+DISTUTILS_IN_SOURCE_BUILD=yes # needed for tests
 inherit distutils-r1
 
 MY_PV="${PV:0:4}-${PV:4:2}-${PV:6:2}"
@@ -18,15 +18,14 @@ if [[ ${PV} == *9999 ]]; then
 else
        
SRC_URI="https://github.com/ProgVal/${MY_PN}/archive/master-${MY_PV}.tar.gz -> 
${P}.tar.gz"
        S="${WORKDIR}/${MY_PN}-master-${MY_PV}"
-       KEYWORDS="~amd64 ~x86"
+       KEYWORDS="~amd64 ~riscv ~x86"
 fi
 
 DESCRIPTION="Python based extensible IRC infobot and channel bot"
 HOMEPAGE="https://docs.limnoria.net";
 LICENSE="BSD GPL-2 GPL-2+"
 SLOT="0"
-IUSE="crypt ssl test"
-RESTRICT=" !test? ( test )"
+IUSE="crypt ssl"
 
 RDEPEND="
        dev-python/chardet[${PYTHON_USEDEP}]
@@ -38,15 +37,12 @@ RDEPEND="
        dev-python/PySocks[${PYTHON_USEDEP}]
        dev-python/sqlalchemy[${PYTHON_USEDEP}]
        crypt? ( dev-python/python-gnupg[${PYTHON_USEDEP}] )
-       ssl? ( dev-python/pyopenssl[${PYTHON_USEDEP}] )
-       !net-irc/supybot
-       !net-irc/supybot-plugins"
-BDEPEND="test? ( dev-python/mock[${PYTHON_USEDEP}] )"
+       ssl? ( dev-python/pyopenssl[${PYTHON_USEDEP}] )"
 
-python_prepare() {
-       einfo "Removing the RSS plugin because of clashes between libxml2's 
Python3"
-       einfo "bindings and feedparser."
-       rm -r "plugins/RSS" || die
+python_prepare_all() {
+       # replace "installed on ${timestamp}" with real version
+       echo "version='${MY_PV//-/.}'" > "${S}"/src/version.py || die
+       distutils-r1_python_prepare_all
 }
 
 python_test() {
@@ -55,9 +51,11 @@ python_test() {
        EXCLUDE_PLUGINS=()
        # intermittent failure due to issues loading libsandbox.so from 
LD_PRELOAD
        # runs successfully when running the tests on the installed system
-       EXCLUDE_PLUGINS+=( --exclude="${PLUGINS_DIR}/Unix" )
-       # Runs despite --no-network (GH #1392)
-       EXCLUDE_PLUGINS+=( --exclude="${PLUGINS_DIR}/Aka" )
+       EXCLUDE_PLUGINS+=(
+               --exclude="${PLUGINS_DIR}/Unix"
+               --exclude="${PLUGINS_DIR}/Aka"
+               --exclude="${PLUGINS_DIR}/Misc"
+       )
        "${EPYTHON}" "${BUILD_DIR}"/scripts/supybot-test "${BUILD_DIR}/../test" 
\
                --plugins-dir="${PLUGINS_DIR}" --no-network \
                --disable-multiprocessing "${EXCLUDE_PLUGINS[@]}" \

diff --git a/net-irc/limnoria/limnoria-99999999.ebuild 
b/net-irc/limnoria/limnoria-99999999.ebuild
index 9f3c9f0c7e1d..2bb6c682e6e1 100644
--- a/net-irc/limnoria/limnoria-99999999.ebuild
+++ b/net-irc/limnoria/limnoria-99999999.ebuild
@@ -25,8 +25,7 @@ DESCRIPTION="Python based extensible IRC infobot and channel 
bot"
 HOMEPAGE="https://docs.limnoria.net";
 LICENSE="BSD GPL-2 GPL-2+"
 SLOT="0"
-IUSE="crypt ssl test"
-RESTRICT=" !test? ( test )"
+IUSE="crypt ssl"
 
 RDEPEND="
        dev-python/chardet[${PYTHON_USEDEP}]
@@ -41,7 +40,6 @@ RDEPEND="
        ssl? ( dev-python/pyopenssl[${PYTHON_USEDEP}] )
        !net-irc/supybot
        !net-irc/supybot-plugins"
-BDEPEND="test? ( dev-python/mock[${PYTHON_USEDEP}] )"
 
 python_prepare() {
        einfo "Removing the RSS plugin because of clashes between libxml2's 
Python3"

Reply via email to