From 827734e19d4d85d2d4cc3f52352996e87fa89d17 Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Mon, 17 Aug 2020 16:04:13 +0200 Subject: dev-python/setproctitle: Port to pypy3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michał Górny --- .../setproctitle/setproctitle-1.1.10-r1.ebuild | 31 +++++++++++----------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/dev-python/setproctitle/setproctitle-1.1.10-r1.ebuild b/dev-python/setproctitle/setproctitle-1.1.10-r1.ebuild index a0662118eee3..b6cec2019595 100644 --- a/dev-python/setproctitle/setproctitle-1.1.10-r1.ebuild +++ b/dev-python/setproctitle/setproctitle-1.1.10-r1.ebuild @@ -2,7 +2,7 @@ # Distributed under the terms of the GNU General Public License v2 EAPI=7 -PYTHON_COMPAT=( python3_{6..9} ) +PYTHON_COMPAT=( python3_{6..9} pypy3 ) inherit distutils-r1 toolchain-funcs @@ -13,21 +13,22 @@ SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" LICENSE="BSD" SLOT="0" 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" -IUSE="test" -RESTRICT="!test? ( test )" -RDEPEND="" -DEPEND="dev-python/setuptools[${PYTHON_USEDEP}] - test? ( dev-python/nose[${PYTHON_USEDEP}] )" - -# Required for re-write of test suite -DISTUTILS_IN_SOURCE_BUILD=1 +python_configure_all() { + 2to3 -w --no-diffs tests || die +} python_test() { - # prepare embedded executable - emake \ - CC="$(tc-getCC)" \ - PYINC="$(python_get_CFLAGS)" \ - PYLIB="$(python_get_LIBS)" \ - check + if [[ ${EPYTHON} != pypy* ]]; then + # prepare executable for embedded interpreter test + # (skipped with pypy) + rm -f tests/pyrun3 || die + emake \ + CC="$(tc-getCC)" \ + PYINC="$(python_get_CFLAGS)" \ + PYLIB="$(python_get_LIBS)" \ + tests/pyrun3 + fi + + "${EPYTHON}" tests/setproctitle_test.py -v || die "Tests failed with ${EPYTHON}" } -- cgit v1.2.3-65-gdbad