commit:     3f3a3b7a6eaa92dc3e3d7c38eda42b976d9bcb22
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 29 12:32:59 2020 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Mon Jun 29 12:32:59 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3f3a3b7a

net-nds/nsscache: [QA] Fix various python issues

Package-Manager: Portage-2.3.103, Repoman-2.3.23
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 net-nds/nsscache/nsscache-0.39.ebuild | 45 ++++++++++++++++++++---------------
 1 file changed, 26 insertions(+), 19 deletions(-)

diff --git a/net-nds/nsscache/nsscache-0.39.ebuild 
b/net-nds/nsscache/nsscache-0.39.ebuild
index f615656a1ee..f50a61c5cd8 100644
--- a/net-nds/nsscache/nsscache-0.39.ebuild
+++ b/net-nds/nsscache/nsscache-0.39.ebuild
@@ -1,10 +1,11 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
+
 PYTHON_COMPAT=( python3_{6,7,8} )
 
-inherit eutils distutils-r1
+inherit distutils-r1
 
 DESCRIPTION="commandline tool to sync directory services to local cache"
 HOMEPAGE="https://github.com/google/nsscache";
@@ -16,44 +17,50 @@ SRC_URI="
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
-REQUIRED_USE="${PYTHON_REQUIRED_USE}"
 IUSE="nsscache s3"
+RESTRICT="test" # requires network
 
-DEPEND="${PYTHON_DEPS}
-               dev-python/ldap3[${PYTHON_USEDEP}]
-               dev-python/pycurl[${PYTHON_USEDEP}]
-               dev-python/bsddb3[${PYTHON_USEDEP}]
-               s3? ( dev-python/boto3[${PYTHON_USEDEP}] )"
+DEPEND="
+       dev-python/ldap3[${PYTHON_USEDEP}]
+       dev-python/pycurl[${PYTHON_USEDEP}]
+       dev-python/bsddb3[${PYTHON_USEDEP}]
+       s3? ( dev-python/boto3[${PYTHON_USEDEP}] )"
 RDEPEND="${DEPEND}
-               nsscache? ( >=sys-auth/libnss-cache-0.10 )"
-RESTRICT="test" # requires network
+       nsscache? ( >=sys-auth/libnss-cache-0.10 )"
+
 S="${WORKDIR}/${PN}-version-${PV}"
 
-src_prepare() {
+python_prepare_all() {
        sed -i \
                -e "/setup_requires/s,'pytest-runner',,g" \
                -e '/tests_require/s,\[.*\],[],g' \
-               "${S}"/setup.py || die
+               setup.py || die
        sed -i \
                -e '/test=pytest/d' \
-               "${S}"/setup.cfg || die
+               setup.cfg || die
        sed -i \
                -e '/pytest/d' \
-               "${S}"/requirements.txt || die
-       distutils-r1_src_prepare
+               requirements.txt || die
+
+       distutils-r1_python_prepare_all
 }
 
 python_compile() {
        distutils-r1_python_compile --verbose
 }
 
-src_install() {
-       distutils-r1_src_install
+python_install() {
+       distutils-r1_python_install
+
+       python_scriptinto /usr/libexec/nsscache
+       python_newexe "${DISTDIR}"/"${SCRIPT_A}" authorized-keys-command.py
+}
+
+python_install_all() {
+       distutils-r1_python_install_all
 
        doman nsscache.1 nsscache.conf.5
        dodoc THANKS nsscache.cron CONTRIBUTING.md README.md
-       exeinto /usr/libexec/nsscache
-       newexe "${DISTDIR}"/"${SCRIPT_A}" authorized-keys-command.py
 
        keepdir /var/lib/nsscache
 }

Reply via email to