Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pypcap/
Date: Wed, 03 Feb 2021 12:41:36
Message-Id: 1612356085.13ef4a5cc96bb68e6ca3d479b056af30b7d8f444.sam@gentoo
1 commit: 13ef4a5cc96bb68e6ca3d479b056af30b7d8f444
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Wed Feb 3 12:41:25 2021 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Wed Feb 3 12:41:25 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=13ef4a5c
7
8 dev-python/pypcap: add Python 3.8+, regenerate w/ Cython
9
10 Package-Manager: Portage-3.0.14, Repoman-3.0.2
11 Signed-off-by: Sam James <sam <AT> gentoo.org>
12
13 ...{pypcap-1.2.3.ebuild => pypcap-1.2.3-r1.ebuild} | 28 ++++++++++++++--------
14 1 file changed, 18 insertions(+), 10 deletions(-)
15
16 diff --git a/dev-python/pypcap/pypcap-1.2.3.ebuild b/dev-python/pypcap/pypcap-1.2.3-r1.ebuild
17 similarity index 59%
18 rename from dev-python/pypcap/pypcap-1.2.3.ebuild
19 rename to dev-python/pypcap/pypcap-1.2.3-r1.ebuild
20 index 345238ce8b9..d2b7e4073d3 100644
21 --- a/dev-python/pypcap/pypcap-1.2.3.ebuild
22 +++ b/dev-python/pypcap/pypcap-1.2.3-r1.ebuild
23 @@ -1,8 +1,9 @@
24 -# Copyright 1999-2020 Gentoo Authors
25 +# Copyright 1999-2021 Gentoo Authors
26 # Distributed under the terms of the GNU General Public License v2
27
28 -EAPI=6
29 -PYTHON_COMPAT=( python3_7 )
30 +EAPI=7
31 +
32 +PYTHON_COMPAT=( python3_{7,8,9} )
33 inherit distutils-r1
34
35 DESCRIPTION="Simplified object-oriented Python extension module for libpcap"
36 @@ -13,18 +14,25 @@ LICENSE="BSD"
37 SLOT="0"
38 KEYWORDS="~amd64 ~x86"
39
40 -RDEPEND="
41 - net-libs/libpcap
42 -"
43 -DEPEND="
44 - ${RDEPEND}
45 - dev-python/setuptools[${PYTHON_USEDEP}]
46 -"
47 +BDEPEND="dev-python/cython[${PYTHON_USEDEP}]"
48 +RDEPEND="net-libs/libpcap"
49 +DEPEND="${RDEPEND}"
50 +
51 PATCHES=(
52 "${FILESDIR}"/${PN}-1.2.3-mktemp.patch
53 )
54
55 python_compile() {
56 local -x CFLAGS="${CFLAGS} -fno-strict-aliasing"
57 +
58 + # Needed to gain Python 3.9 compatibility
59 + cython pcap.pyx || die "Failed to regenerate pcap.pyx"
60 +
61 + # Now build as usual
62 distutils-r1_python_compile
63 }
64 +
65 +python_test() {
66 + cd tests || die
67 + "${EPYTHON}" test.py || die
68 +}