1 |
commit: 3f3a3b7a6eaa92dc3e3d7c38eda42b976d9bcb22 |
2 |
Author: David Seifert <soap <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jun 29 12:32:59 2020 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jun 29 12:32:59 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3f3a3b7a |
7 |
|
8 |
net-nds/nsscache: [QA] Fix various python issues |
9 |
|
10 |
Package-Manager: Portage-2.3.103, Repoman-2.3.23 |
11 |
Signed-off-by: David Seifert <soap <AT> gentoo.org> |
12 |
|
13 |
net-nds/nsscache/nsscache-0.39.ebuild | 45 ++++++++++++++++++++--------------- |
14 |
1 file changed, 26 insertions(+), 19 deletions(-) |
15 |
|
16 |
diff --git a/net-nds/nsscache/nsscache-0.39.ebuild b/net-nds/nsscache/nsscache-0.39.ebuild |
17 |
index f615656a1ee..f50a61c5cd8 100644 |
18 |
--- a/net-nds/nsscache/nsscache-0.39.ebuild |
19 |
+++ b/net-nds/nsscache/nsscache-0.39.ebuild |
20 |
@@ -1,10 +1,11 @@ |
21 |
-# Copyright 1999-2018 Gentoo Foundation |
22 |
+# Copyright 1999-2020 Gentoo Authors |
23 |
# Distributed under the terms of the GNU General Public License v2 |
24 |
|
25 |
EAPI=7 |
26 |
+ |
27 |
PYTHON_COMPAT=( python3_{6,7,8} ) |
28 |
|
29 |
-inherit eutils distutils-r1 |
30 |
+inherit distutils-r1 |
31 |
|
32 |
DESCRIPTION="commandline tool to sync directory services to local cache" |
33 |
HOMEPAGE="https://github.com/google/nsscache" |
34 |
@@ -16,44 +17,50 @@ SRC_URI=" |
35 |
LICENSE="GPL-2" |
36 |
SLOT="0" |
37 |
KEYWORDS="~amd64 ~x86" |
38 |
-REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
39 |
IUSE="nsscache s3" |
40 |
+RESTRICT="test" # requires network |
41 |
|
42 |
-DEPEND="${PYTHON_DEPS} |
43 |
- dev-python/ldap3[${PYTHON_USEDEP}] |
44 |
- dev-python/pycurl[${PYTHON_USEDEP}] |
45 |
- dev-python/bsddb3[${PYTHON_USEDEP}] |
46 |
- s3? ( dev-python/boto3[${PYTHON_USEDEP}] )" |
47 |
+DEPEND=" |
48 |
+ dev-python/ldap3[${PYTHON_USEDEP}] |
49 |
+ dev-python/pycurl[${PYTHON_USEDEP}] |
50 |
+ dev-python/bsddb3[${PYTHON_USEDEP}] |
51 |
+ s3? ( dev-python/boto3[${PYTHON_USEDEP}] )" |
52 |
RDEPEND="${DEPEND} |
53 |
- nsscache? ( >=sys-auth/libnss-cache-0.10 )" |
54 |
-RESTRICT="test" # requires network |
55 |
+ nsscache? ( >=sys-auth/libnss-cache-0.10 )" |
56 |
+ |
57 |
S="${WORKDIR}/${PN}-version-${PV}" |
58 |
|
59 |
-src_prepare() { |
60 |
+python_prepare_all() { |
61 |
sed -i \ |
62 |
-e "/setup_requires/s,'pytest-runner',,g" \ |
63 |
-e '/tests_require/s,\[.*\],[],g' \ |
64 |
- "${S}"/setup.py || die |
65 |
+ setup.py || die |
66 |
sed -i \ |
67 |
-e '/test=pytest/d' \ |
68 |
- "${S}"/setup.cfg || die |
69 |
+ setup.cfg || die |
70 |
sed -i \ |
71 |
-e '/pytest/d' \ |
72 |
- "${S}"/requirements.txt || die |
73 |
- distutils-r1_src_prepare |
74 |
+ requirements.txt || die |
75 |
+ |
76 |
+ distutils-r1_python_prepare_all |
77 |
} |
78 |
|
79 |
python_compile() { |
80 |
distutils-r1_python_compile --verbose |
81 |
} |
82 |
|
83 |
-src_install() { |
84 |
- distutils-r1_src_install |
85 |
+python_install() { |
86 |
+ distutils-r1_python_install |
87 |
+ |
88 |
+ python_scriptinto /usr/libexec/nsscache |
89 |
+ python_newexe "${DISTDIR}"/"${SCRIPT_A}" authorized-keys-command.py |
90 |
+} |
91 |
+ |
92 |
+python_install_all() { |
93 |
+ distutils-r1_python_install_all |
94 |
|
95 |
doman nsscache.1 nsscache.conf.5 |
96 |
dodoc THANKS nsscache.cron CONTRIBUTING.md README.md |
97 |
- exeinto /usr/libexec/nsscache |
98 |
- newexe "${DISTDIR}"/"${SCRIPT_A}" authorized-keys-command.py |
99 |
|
100 |
keepdir /var/lib/nsscache |
101 |
} |