summaryrefslogtreecommitdiff
path: root/dev-python/PySDL2
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-08-25 10:45:55 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-08-25 10:45:55 +0100
commit3cf7c3ef441822c889356fd1812ebf2944a59851 (patch)
treec513fe68548b40365c1c2ebfe35c58ad431cdd77 /dev-python/PySDL2
parent05b8b0e0af1d72e51a3ee61522941bf7605cd01c (diff)
gentoo resync : 25.08.2020
Diffstat (limited to 'dev-python/PySDL2')
-rw-r--r--dev-python/PySDL2/Manifest7
-rw-r--r--dev-python/PySDL2/PySDL2-0.9.7.ebuild (renamed from dev-python/PySDL2/PySDL2-0.9.6.ebuild)19
-rw-r--r--dev-python/PySDL2/files/PySDL2-0.9.6-0001-test-Always-allow-greater-patch-version-of-SDL2.patch47
-rw-r--r--dev-python/PySDL2/files/PySDL2-0.9.6-0002-test-Handle-missing-haptic-support-gracefully.patch26
-rw-r--r--dev-python/PySDL2/files/PySDL2-0.9.7-nameerror.patch24
5 files changed, 34 insertions, 89 deletions
diff --git a/dev-python/PySDL2/Manifest b/dev-python/PySDL2/Manifest
index f7b9ac09742f..721341f143c9 100644
--- a/dev-python/PySDL2/Manifest
+++ b/dev-python/PySDL2/Manifest
@@ -1,5 +1,4 @@
-AUX PySDL2-0.9.6-0001-test-Always-allow-greater-patch-version-of-SDL2.patch 1812 BLAKE2B 7551d27fe1044d9a7bbe741fd70417f3f180d722915e53ff4374efc5575c70c8171cf4032d26e3b7703eb39e7da4998c6d867447a5338c76897ae84e598192ac SHA512 1a26d4db26b5fbc3c259c110825dbefa272e5c565928d041951438d1ed2012a67b3a06b2158b1c2a7c57685ab6e22363c3841e8bb3bf2e54ea21553b386c89cf
-AUX PySDL2-0.9.6-0002-test-Handle-missing-haptic-support-gracefully.patch 950 BLAKE2B e4baf35535ff37a845ba65127d6e580d2c5086e60df0d03a6939b5fee7dac860475503b01644097d9af2a21209e25258524f0feacd45729574034095615ecaf3 SHA512 50b1785d02290ce9544743cea245e216f8cbbadaf9dfc0c865fadd21e1beea88a64d89a304bcfb72e8b2cc19a961fba3c23de028b7caf7e16739f9665dd9aa1a
-DIST PySDL2-0.9.6.tar.gz 1048158 BLAKE2B 70a450990dd73169489af2d5b218eea0794c9f75948d774680df4b4423855318ddc6d16a0453f62361d4f0b81e872edc067235c4f946476ea8988e16cd0de44c SHA512 676b1b3381b614122442c70fe4cbd7c210ef3d8695c2babd37938e67b5cfeb2f8acbdcb914c5f68aceb549d89f7a77bdc80c7406b340b0e38c22543df8d46739
-EBUILD PySDL2-0.9.6.ebuild 1905 BLAKE2B 7dcb8cf810ddf63ec416401cca6d564b619a006fa68c6d7394b751f4fa72efbd9ac2e7eef994e84d3c3f4348ce8aa6aa51326f3fb237a4a53a4bf5e8a77a382a SHA512 0eac1a09aa60fabb1d3b690bed3782be724fcf92ec00e5b55e1522cf3b5e632c58a621e7a5266085f90a5f4ab14d29871e2dbaa727626f9078b5a642297817c7
+AUX PySDL2-0.9.7-nameerror.patch 942 BLAKE2B e8f0bb42f4e1ab6ec975a68911a82da2b2bc726dfb88ddde6a6eacdc65cc44acdac1de9aa4c1fd77c4ebd059b5230d267f02730235042dfa4a4a0db7ce26c195 SHA512 e0fa73ab8408384771769a24e016776c7a7878900cf84e622312847243b6c63634a7133599b79d31969c17a6107b692f7a0e927aba6d4275c81587570ba51513
+DIST PySDL2-0.9.7.tar.gz 1079253 BLAKE2B 986a21d8c2f4f45df683d85a8369be7b39f102e59a1b3fd37e2941065a1174d5cd6dd056f78fbc66663e2cf50228ee40abf67352e5ae75176a9c000fb6f672fb SHA512 10d40063762272eaaae1cb6290e007481887806938ba0ba17d28974a3a3c8b36570054587001d00eb9ab4aa2375c616c43a81c7e7308fbb9b61b55b3eb7da5ac
+EBUILD PySDL2-0.9.7.ebuild 1544 BLAKE2B ed38e3bdd83709909ba709327afb00f4d2bbeb1e3ebc6baba799c19078264ad8d82a05fc23fc96a2253633218b26e713860dcfec814ee42a507ddd999cfc62b6 SHA512 7a1dae796822e7542ac20b4819e5c878b1d8a43bd59b2c35884e6ecd78fd8af85537f60734fb8f6b9b40f6eacd1dcdd307a11ac0a8213758ce0f81d6bd5adb3c
MISC metadata.xml 451 BLAKE2B 2bc91faee3235d8d971aaba13051362ffe22563c5bc5a33a4dcaa0fa59abb7f238310d271a5311c98d4f69b112f731e11d1c8c49fa1a1d2bed1a5acf36c905f5 SHA512 50ba020088e640ca59a7ab64e30ff760b4708866ebc54b91fa2a12e4408463ebb0b04cfe990113bb7f556cbe8a4fc369fe86e3da4ec5b79a76752868cd08a62c
diff --git a/dev-python/PySDL2/PySDL2-0.9.6.ebuild b/dev-python/PySDL2/PySDL2-0.9.7.ebuild
index 85eed5b0afaa..e35d95277021 100644
--- a/dev-python/PySDL2/PySDL2-0.9.6.ebuild
+++ b/dev-python/PySDL2/PySDL2-0.9.7.ebuild
@@ -1,10 +1,9 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=7
-DISTUTILS_USE_SETUPTOOLS=no
-PYTHON_COMPAT=( python3_{6,7} )
+PYTHON_COMPAT=( python3_{6..9} )
inherit distutils-r1
DESCRIPTION="Python (ctypes) bindings for SDL2 libraries"
@@ -14,8 +13,6 @@ SRC_URI="mirror://pypi/${PN::1}/${PN}/${P}.tar.gz"
LICENSE="|| ( public-domain CC0-1.0 ZLIB )"
SLOT="0"
KEYWORDS="~amd64 ~x86"
-IUSE="test"
-RESTRICT="!test? ( test )"
# Optional deps:
# - dev-python/numpy,
@@ -40,11 +37,10 @@ DEPEND="
media-libs/sdl2-ttf
)"
+distutils_enable_tests pytest
+
PATCHES=(
- # fix tests to allow newer versions of libsdl2
- "${FILESDIR}"/PySDL2-0.9.6-0001-test-Always-allow-greater-patch-version-of-SDL2.patch
- # fix tests to handle missing haptic support gracefully
- "${FILESDIR}"/PySDL2-0.9.6-0002-test-Handle-missing-haptic-support-gracefully.patch
+ "${FILESDIR}"/${P}-nameerror.patch
)
src_prepare() {
@@ -55,12 +51,11 @@ src_prepare() {
distutils-r1_src_prepare
}
-python_test() {
+src_test() {
# from .travis.yml
local -x SDL_VIDEODRIVER=dummy
local -x SDL_AUDIODRIVER=dummy
local -x SDL_RENDER_DRIVER=software
- "${PYTHON}" -m unittest discover -v \
- -s sdl2/test -p '*_test.py' || die "Tests fail with ${EPYTHON}"
+ distutils-r1_src_test
}
diff --git a/dev-python/PySDL2/files/PySDL2-0.9.6-0001-test-Always-allow-greater-patch-version-of-SDL2.patch b/dev-python/PySDL2/files/PySDL2-0.9.6-0001-test-Always-allow-greater-patch-version-of-SDL2.patch
deleted file mode 100644
index 0b72f9036637..000000000000
--- a/dev-python/PySDL2/files/PySDL2-0.9.6-0001-test-Always-allow-greater-patch-version-of-SDL2.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From d34a898bb8d8bfd9cb4a85ff880826e4c7f2b0f7 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
-Date: Mon, 1 Jan 2018 12:31:52 +0100
-Subject: [PATCH 1/2] test: Always allow greater patch-version of SDL2
-
-Similarly to sdlimage_test, allow newer patch-version of other SDL2
-libraries. There is no technical reason to prevent people from upgrading
-libsdl2 while having old PySDL2 installed, and there is no reason to
-make tests fail every time libsdl2 happens to be upgraded.
-
-(backported for 0.9.6)
-
-Closes: https://github.com/marcusva/py-sdl2/issues/115
----
- sdl2/test/sdlmixer_test.py | 2 +-
- sdl2/test/version_test.py | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/sdl2/test/sdlmixer_test.py b/sdl2/test/sdlmixer_test.py
-index 00c2ca6..1cebe55 100644
---- a/sdl2/test/sdlmixer_test.py
-+++ b/sdl2/test/sdlmixer_test.py
-@@ -27,7 +27,7 @@ class SDLMixerTest(unittest.TestCase):
- self.assertIsInstance(v.contents, version.SDL_version)
- self.assertEqual(v.contents.major, 2)
- self.assertEqual(v.contents.minor, 0)
-- self.assertEqual(v.contents.patch, 1)
-+ self.assertGreaterEqual(v.contents.patch, 1)
-
- if __name__ == '__main__':
- sys.exit(unittest.main())
-diff --git a/sdl2/test/version_test.py b/sdl2/test/version_test.py
-index 51b5065..60e5bcf 100644
---- a/sdl2/test/version_test.py
-+++ b/sdl2/test/version_test.py
-@@ -25,7 +25,7 @@ class SDLVersionTest(unittest.TestCase):
- self.assertEqual(type(v), version.SDL_version)
- self.assertEqual(v.major, 2)
- self.assertEqual(v.minor, 0)
-- self.assertEqual(v.patch, 6)
-+ self.assertGreaterEqual(v.patch, 6)
-
- def test_SDL_VERSIONNUM(self):
- self.assertEqual(version.SDL_VERSIONNUM(1, 2, 3), 1203)
---
-2.16.0.rc0
-
diff --git a/dev-python/PySDL2/files/PySDL2-0.9.6-0002-test-Handle-missing-haptic-support-gracefully.patch b/dev-python/PySDL2/files/PySDL2-0.9.6-0002-test-Handle-missing-haptic-support-gracefully.patch
deleted file mode 100644
index 2b03fed4d09d..000000000000
--- a/dev-python/PySDL2/files/PySDL2-0.9.6-0002-test-Handle-missing-haptic-support-gracefully.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 4a38a0ef4c13ec3c518b78c0e56550fb8af43119 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
-Date: Mon, 1 Jan 2018 13:29:16 +0100
-Subject: [PATCH 2/2] test: Handle missing haptic support gracefully
-
----
- sdl2/test/sdl_test.py | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/sdl2/test/sdl_test.py b/sdl2/test/sdl_test.py
-index 70c2e98..402e549 100644
---- a/sdl2/test/sdl_test.py
-+++ b/sdl2/test/sdl_test.py
-@@ -47,7 +47,8 @@ class SDLTest(unittest.TestCase):
- "FreeBSD des not support haptic input yet")
- def test_SDL_INIT_HAPTIC(self):
- ret = SDL_Init(SDL_INIT_HAPTIC)
-- self.assertEqual(ret, 0, SDL_GetError())
-+ if ret != 0:
-+ self.skipTest('Haptic subsystem not supported')
- ret = SDL_WasInit(SDL_INIT_HAPTIC)
- self.assertEqual(ret, SDL_INIT_HAPTIC)
- SDL_QuitSubSystem(SDL_INIT_HAPTIC)
---
-2.16.0.rc0
-
diff --git a/dev-python/PySDL2/files/PySDL2-0.9.7-nameerror.patch b/dev-python/PySDL2/files/PySDL2-0.9.7-nameerror.patch
new file mode 100644
index 000000000000..c94d354c576f
--- /dev/null
+++ b/dev-python/PySDL2/files/PySDL2-0.9.7-nameerror.patch
@@ -0,0 +1,24 @@
+From 635048e81402f3dcc9719c060a67f33e6950649c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Sun, 12 Jul 2020 08:18:06 +0200
+Subject: [PATCH] Fix NameError when calling SDL_SetColorKey()
+
+---
+ sdl2/ext/image.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/sdl2/ext/image.py b/sdl2/ext/image.py
+index 1a413e1..49d897d 100644
+--- a/sdl2/ext/image.py
++++ b/sdl2/ext/image.py
+@@ -154,6 +154,6 @@ def load_image(fname, enforce=None):
+ # If the image has a single transparent palette index, set
+ # that index as the color key to make blitting correct.
+ if 'transparency' in image.info and isinstance(image.info['transparency'], int):
+- sdl2.SDL_SetColorKey(imgsurface, True, image.info['transparency'])
++ surface.SDL_SetColorKey(imgsurface, True, image.info['transparency'])
+
+ return imgsurface
+--
+2.27.0
+