summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2020-08-17 16:04:13 +0200
committerMichał Górny <mgorny@gentoo.org>2020-08-18 10:03:55 +0200
commit827734e19d4d85d2d4cc3f52352996e87fa89d17 (patch)
tree98430f5feaac81979a4190b852a3c6c78b6b08eb
parentdev-lang/python: Respect MAKEOPTS throughout the build (diff)
downloadgentoo-827734e19d4d85d2d4cc3f52352996e87fa89d17.tar.gz
gentoo-827734e19d4d85d2d4cc3f52352996e87fa89d17.tar.bz2
gentoo-827734e19d4d85d2d4cc3f52352996e87fa89d17.zip
dev-python/setproctitle: Port to pypy3
Signed-off-by: Michał Górny <mgorny@gentoo.org>
-rw-r--r--dev-python/setproctitle/setproctitle-1.1.10-r1.ebuild31
1 files 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}"
}