From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 7A16E1382C5 for ; Sun, 7 Jun 2020 20:54:13 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A1834E08A0; Sun, 7 Jun 2020 20:54:12 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 8496EE08A0 for ; Sun, 7 Jun 2020 20:54:12 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id EB76E34EDE7 for ; Sun, 7 Jun 2020 20:54:10 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 5B0E31F9 for ; Sun, 7 Jun 2020 20:54:08 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1591563245.93f99c3a92c8b85ef29c684642e0dfd97936ca86.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pygame/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-python/pygame/pygame-1.9.6-r1.ebuild X-VCS-Directories: dev-python/pygame/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 93f99c3a92c8b85ef29c684642e0dfd97936ca86 X-VCS-Branch: master Date: Sun, 7 Jun 2020 20:54:08 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: fe7bce8c-4230-4496-9dd2-493d524ec2fe X-Archives-Hash: 81135381070a22bc42e9740a34973c6b commit: 93f99c3a92c8b85ef29c684642e0dfd97936ca86 Author: Michał Górny gentoo org> AuthorDate: Sun Jun 7 20:36:01 2020 +0000 Commit: Michał Górny gentoo org> CommitDate: Sun Jun 7 20:54:05 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=93f99c3a dev-python/pygame: Fix tests Signed-off-by: Michał Górny gentoo.org> dev-python/pygame/pygame-1.9.6-r1.ebuild | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/dev-python/pygame/pygame-1.9.6-r1.ebuild b/dev-python/pygame/pygame-1.9.6-r1.ebuild index e2fa6c9fcde..253ffc048c4 100644 --- a/dev-python/pygame/pygame-1.9.6-r1.ebuild +++ b/dev-python/pygame/pygame-1.9.6-r1.ebuild @@ -13,7 +13,8 @@ SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" LICENSE="LGPL-2.1" SLOT="0" KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ppc ~ppc64 ~sparc x86" -IUSE="doc examples midi opengl X" +IUSE="doc examples midi opengl test X" +RESTRICT="!test? ( test )" DEPEND="dev-python/numpy[${PYTHON_USEDEP}] >=media-libs/sdl-image-1.2.2[png,jpeg] @@ -24,9 +25,18 @@ DEPEND="dev-python/numpy[${PYTHON_USEDEP}] X? ( >=media-libs/libsdl-1.2.5[opengl?,video,X] ) !X? ( >=media-libs/libsdl-1.2.5 )" RDEPEND="${DEPEND}" +# util-linux provides script +BDEPEND=" + test? ( sys-apps/util-linux )" -# various module import and data path issues -RESTRICT=test +src_prepare() { + # segfaults on Xvfb + rm test/scrap_test.py || die + # backport from git master (clock() isn't used) + sed -i -e '/from time import clock/d' test/math_test.py || die + + distutils-r1_src_prepare +} python_configure() { PORTMIDI_INC_PORTTIME=1 LOCALBASE="${EPREFIX}/usr" \ @@ -52,8 +62,14 @@ python_compile() { distutils-r1_python_compile } +src_test() { + virtx distutils-r1_src_test +} + python_test() { - PYTHONPATH="${BUILD_DIR}/lib" virtx "${EPYTHON}" -m pygame.tests + local -x PYTHONPATH= + distutils_install_for_testing + script -eqc "${EPYTHON} -m pygame.tests" || die } python_install() {