commit:     b1f8a27e233137bcf03cd92c2d0e4cec13563920
Author:     Bernard Cafarelli <voyageur <AT> gentoo <DOT> org>
AuthorDate: Fri Mar  5 16:40:48 2021 +0000
Commit:     Bernard Cafarelli <voyageur <AT> gentoo <DOT> org>
CommitDate: Fri Mar  5 16:40:59 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b1f8a27e

net-analyzer/wapiti: skip tests in installation

Also restrict tests for now, new ones require php webserver local
execution

Closes: https://bugs.gentoo.org/774300
Package-Manager: Portage-3.0.16, Repoman-3.0.2
Signed-off-by: Bernard Cafarelli <voyageur <AT> gentoo.org>

 net-analyzer/wapiti/wapiti-3.0.4.ebuild | 9 ++++++++-
 net-analyzer/wapiti/wapiti-9999.ebuild  | 8 ++++++--
 2 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/net-analyzer/wapiti/wapiti-3.0.4.ebuild 
b/net-analyzer/wapiti/wapiti-3.0.4.ebuild
index 37fdae6f81a..4363743763e 100644
--- a/net-analyzer/wapiti/wapiti-3.0.4.ebuild
+++ b/net-analyzer/wapiti/wapiti-3.0.4.ebuild
@@ -28,9 +28,16 @@ RDEPEND="dev-python/beautifulsoup:4[${PYTHON_USEDEP}]
        kerberos? ( dev-python/requests-kerberos[${PYTHON_USEDEP}] )
        ntlm? ( dev-python/requests-ntlm[${PYTHON_USEDEP}] )"
 
+distutils_enable_tests --install pytest
+BDEPEND+=" test? ( dev-python/responses[${PYTHON_USEDEP}] )"
+# Many tests require execution of local test php server
+RESTRICT="test"
+
 S=${WORKDIR}/${MY_P}
 
 python_prepare_all() {
-       sed -e 's/"pytest-runner"//' -i setup.py || die
+       sed -e 's/"pytest-runner"//' \
+               -e "/find_packages/s/()/(exclude=['tests*'])/" \
+               -i setup.py || die
        distutils-r1_python_prepare_all
 }

diff --git a/net-analyzer/wapiti/wapiti-9999.ebuild 
b/net-analyzer/wapiti/wapiti-9999.ebuild
index 53a705934cd..53d40bbaa97 100644
--- a/net-analyzer/wapiti/wapiti-9999.ebuild
+++ b/net-analyzer/wapiti/wapiti-9999.ebuild
@@ -27,10 +27,14 @@ RDEPEND="dev-python/beautifulsoup:4[${PYTHON_USEDEP}]
        kerberos? ( dev-python/requests-kerberos[${PYTHON_USEDEP}] )
        ntlm? ( dev-python/requests-ntlm[${PYTHON_USEDEP}] )"
 
-distutils_enable_tests pytest
+distutils_enable_tests --install pytest
 BDEPEND+=" test? ( dev-python/responses[${PYTHON_USEDEP}] )"
+# Many tests require execution of local test php server
+RESTRICT="test"
 
 python_prepare_all() {
-       sed -e 's/"pytest-runner"//' -i setup.py || die
+       sed -e 's/"pytest-runner"//' \
+               -e "/find_packages/s/()/(exclude=['tests*'])/" \
+               -i setup.py || die
        distutils-r1_python_prepare_all
 }

Reply via email to