dev-python/pygame: Bump to 2.0.0.dev10

Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
Michał Górny
2020-06-08 11:29:02 +02:00
parent c05a769bc3
commit ede46deb06
3 changed files with 112 additions and 0 deletions

View File

@@ -1 +1,2 @@
DIST pygame-1.9.6.tar.gz 3223131 BLAKE2B a4d04c933fcad244d32bd512ef8717e60ec923f361e9e0296b5c7d57c5949d3434a040d028249c5b8f3c865ac3dcdbb32e6f0b223186678595a8625213ba2a17 SHA512 d923c554203a7c35e37921658cb4c5bf50215ab0ff4d2b869a1ee6b2e2ca31d66ec4bbde4287f5a777838ffe932cd15b993cb0224b86e43d684de61c35acbcd0
DIST pygame-2.0.0.dev10.tar.gz 5567274 BLAKE2B 7d78f260318cfabeb33f1073ae210f890d2f772e3ef302f243cca67724c6012355644ba60d4cae6de72db6dd61d320177deff6ee83dd355ec4cc33e841b565f7 SHA512 4cee7599fd8a6d31ddd66bfaad3bbb67cb167c1ae339f37e83322d810fea8746e81a191c224a0eeb6cc43a64bf1730ff0886c82f1a4f642e2e656ca9a837bf9e

View File

@@ -0,0 +1,34 @@
From 159908e5726c3df5df58429d1ff3113137c57f98 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
Date: Mon, 8 Jun 2020 09:35:41 +0200
Subject: [PATCH] Replace long-deprecated Thread.isAlive() with .is_alive()
Replace Thread.isAlive() calls with Thread.is_alive() to fix
compatibility with Python 3.9. The new method was present since py2.6,
the old one got deprecated in py3.1 and was finally removed in py3.9.
---
test/threads_test.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/test/threads_test.py b/test/threads_test.py
index 300f6a9c6..59ab5d488 100644
--- a/test/threads_test.py
+++ b/test/threads_test.py
@@ -41,7 +41,7 @@ def test_stop(self):
self.assertGreater(len(wq.pool), 0)
for t in wq.pool:
- self.assertTrue(t.isAlive())
+ self.assertTrue(t.is_alive())
for i in xrange_(200):
wq.do(lambda x: x + 1, i)
@@ -49,7 +49,7 @@ def test_stop(self):
wq.stop()
for t in wq.pool:
- self.assertFalse(t.isAlive())
+ self.assertFalse(t.is_alive())
self.assertIs(wq.queue.get(), STOP)

View File

@@ -0,0 +1,77 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{6..9} )
inherit flag-o-matic distutils-r1 virtualx
MY_PV=${PV/_pre/.dev}
MY_P=${PN}-${MY_PV}
DESCRIPTION="Python bindings for SDL multimedia library"
HOMEPAGE="https://www.pygame.org/"
SRC_URI="
https://github.com/pygame/pygame/releases/download/${MY_PV}/${MY_P}.tar.gz"
S=${WORKDIR}/${MY_P}
LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="doc examples midi opengl test X"
RESTRICT="!test? ( test )"
DEPEND="dev-python/numpy[${PYTHON_USEDEP}]
>=media-libs/sdl2-image-1.2.2[png,jpeg]
>=media-libs/sdl2-mixer-1.2.4
>=media-libs/sdl2-ttf-2.0.6
>=media-libs/smpeg2-0.4.4-r1
midi? ( media-libs/portmidi )
X? ( >=media-libs/libsdl2-1.2.5[opengl?,video,X] )
!X? ( >=media-libs/libsdl2-1.2.5 )"
RDEPEND="${DEPEND}"
# util-linux provides script
BDEPEND="
test? ( sys-apps/util-linux )"
PATCHES=(
"${FILESDIR}"/${P}-py39.patch
)
python_configure() {
PORTMIDI_INC_PORTTIME=1 LOCALBASE="${EPREFIX}/usr" \
"${EPYTHON}" "${S}"/buildconfig/config.py -auto || die
# Disable automagic dependency on PortMidi.
if ! use midi; then
sed -e "s:^pypm :#&:" -i Setup || die "sed failed"
fi
}
src_test() {
virtx distutils-r1_src_test
}
python_test() {
local -x PYTHONPATH=
distutils_install_for_testing
script -eqc "${EPYTHON} -m pygame.tests" || die
}
python_install() {
distutils-r1_python_install
# Bug #497720
rm -fr "${D}"$(python_get_sitedir)/pygame/{docs,examples,tests}/ || die
}
python_install_all() {
distutils-r1_python_install_all
if use doc; then
docinto html
dodoc -r docs/*
fi
use examples && dodoc -r examples
}