commit:     b54356ae1bac6317d873c3d14a352e80f1d11ea1
Author:     Maciej Barć <xgqt <AT> protonmail <DOT> com>
AuthorDate: Sat Dec 19 18:59:32 2020 +0000
Commit:     Maciej Barć <xgqt <AT> protonmail <DOT> com>
CommitDate: Sat Dec 19 18:59:32 2020 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=b54356ae

app-text/komikku: fix; use python-single-r1

Package-Manager: Portage-3.0.9, Repoman-3.0.2
Signed-off-by: Maciej Barć <xgqt <AT> protonmail.com>

 app-text/komikku/komikku-0.24.0.ebuild | 39 +++++++++++++++++-----------------
 1 file changed, 20 insertions(+), 19 deletions(-)

diff --git a/app-text/komikku/komikku-0.24.0.ebuild 
b/app-text/komikku/komikku-0.24.0.ebuild
index e8316d26..8332e74b 100644
--- a/app-text/komikku/komikku-0.24.0.ebuild
+++ b/app-text/komikku/komikku-0.24.0.ebuild
@@ -7,33 +7,32 @@ MY_PN="Komikku"
 MY_P="${MY_PN}-${PV}"
 
 PYTHON_COMPAT=( python3_{7,8} )
-DISTUTILS_USE_SETUPTOOLS=no
 
-inherit distutils-r1 meson gnome2-utils xdg
+inherit python-single-r1 meson gnome2-utils xdg
 
 DESCRIPTION="An online/offline manga reader for GNOME"
 HOMEPAGE="https://gitlab.com/valos/Komikku";
 
SRC_URI="https://gitlab.com/valos/${MY_PN}/-/archive/v${PV}/${MY_PN}-v${PV}.tar.gz
 -> ${P}.tar.gz"
 
+RESTRICT="test"
 KEYWORDS="~amd64"
 LICENSE="GPL-3"
 SLOT="0"
 
-# Requires network connection to test
-RESTRICT="test"
-
 DEPEND="
        >=gui-libs/libhandy-1.0.2
        >=x11-libs/gtk+-3.24.10
-       dev-python/beautifulsoup:4[${PYTHON_USEDEP}]
-       dev-python/cloudscraper[${PYTHON_USEDEP}]
-       dev-python/dateparser[${PYTHON_USEDEP}]
-       dev-python/keyring[${PYTHON_USEDEP}]
-       dev-python/lxml[${PYTHON_USEDEP}]
-       dev-python/pillow[${PYTHON_USEDEP}]
-       dev-python/pure-protobuf[${PYTHON_USEDEP}]
-       dev-python/python-magic[${PYTHON_USEDEP}]
-       dev-python/unidecode[${PYTHON_USEDEP}]
+       $(python_gen_cond_dep '
+               dev-python/beautifulsoup:4[${PYTHON_USEDEP}]
+               dev-python/cloudscraper[${PYTHON_USEDEP}]
+               dev-python/dateparser[${PYTHON_USEDEP}]
+               dev-python/keyring[${PYTHON_USEDEP}]
+               dev-python/lxml[${PYTHON_USEDEP}]
+               dev-python/pillow[${PYTHON_USEDEP}]
+               dev-python/pure-protobuf[${PYTHON_USEDEP}]
+               dev-python/python-magic[${PYTHON_USEDEP}]
+               dev-python/unidecode[${PYTHON_USEDEP}]
+       ')
 "
 RDEPEND="
        ${DEPEND}
@@ -41,15 +40,17 @@ RDEPEND="
 
 S="${WORKDIR}/${MY_PN}-v${PV}"
 
-distutils_enable_tests pytest
+pkg_setup() {
+       python-single-r1_pkg_setup
+}
 
 src_install() {
        meson_src_install
-       python_foreach_impl python_optimize
-}
+       python_optimize
 
-src_test() {
-       PYTHONPATH="${S}:${PYTHONPATH}" python_foreach_impl python_test
+       # Dirty hack (python_doscript doesn't work)
+       echo "#!/usr/bin/${EPYTHON}
+       $(cat ${D}/usr/bin/${PN})" > "${D}/usr/bin/${PN}"
 }
 
 pkg_preinst() {

Reply via email to