Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/setproctitle/
Date: Tue, 18 Aug 2020 08:04:04
Message-Id: 1597737835.827734e19d4d85d2d4cc3f52352996e87fa89d17.mgorny@gentoo
1 commit: 827734e19d4d85d2d4cc3f52352996e87fa89d17
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Mon Aug 17 14:04:13 2020 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Tue Aug 18 08:03:55 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=827734e1
7
8 dev-python/setproctitle: Port to pypy3
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 .../setproctitle/setproctitle-1.1.10-r1.ebuild | 31 +++++++++++-----------
13 1 file changed, 16 insertions(+), 15 deletions(-)
14
15 diff --git a/dev-python/setproctitle/setproctitle-1.1.10-r1.ebuild b/dev-python/setproctitle/setproctitle-1.1.10-r1.ebuild
16 index a0662118eee..b6cec201959 100644
17 --- a/dev-python/setproctitle/setproctitle-1.1.10-r1.ebuild
18 +++ b/dev-python/setproctitle/setproctitle-1.1.10-r1.ebuild
19 @@ -2,7 +2,7 @@
20 # Distributed under the terms of the GNU General Public License v2
21
22 EAPI=7
23 -PYTHON_COMPAT=( python3_{6..9} )
24 +PYTHON_COMPAT=( python3_{6..9} pypy3 )
25
26 inherit distutils-r1 toolchain-funcs
27
28 @@ -13,21 +13,22 @@ SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
29 LICENSE="BSD"
30 SLOT="0"
31 KEYWORDS="~alpha amd64 arm arm64 ~ia64 ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
32 -IUSE="test"
33 -RESTRICT="!test? ( test )"
34
35 -RDEPEND=""
36 -DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
37 - test? ( dev-python/nose[${PYTHON_USEDEP}] )"
38 -
39 -# Required for re-write of test suite
40 -DISTUTILS_IN_SOURCE_BUILD=1
41 +python_configure_all() {
42 + 2to3 -w --no-diffs tests || die
43 +}
44
45 python_test() {
46 - # prepare embedded executable
47 - emake \
48 - CC="$(tc-getCC)" \
49 - PYINC="$(python_get_CFLAGS)" \
50 - PYLIB="$(python_get_LIBS)" \
51 - check
52 + if [[ ${EPYTHON} != pypy* ]]; then
53 + # prepare executable for embedded interpreter test
54 + # (skipped with pypy)
55 + rm -f tests/pyrun3 || die
56 + emake \
57 + CC="$(tc-getCC)" \
58 + PYINC="$(python_get_CFLAGS)" \
59 + PYLIB="$(python_get_LIBS)" \
60 + tests/pyrun3
61 + fi
62 +
63 + "${EPYTHON}" tests/setproctitle_test.py -v || die "Tests failed with ${EPYTHON}"
64 }