diff --git a/python-pygame-python38-import.patch b/python-pygame-python38-import.patch new file mode 100644 index 0000000..f208a81 --- /dev/null +++ b/python-pygame-python38-import.patch @@ -0,0 +1,22 @@ +From 9b5f88bca562f37d30eb7ac0f8f4ebdda68cb494 Mon Sep 17 00:00:00 2001 +From: Christoph Gohlke +Date: Wed, 14 Aug 2019 14:01:06 -0700 +Subject: [PATCH] Fix test error on Python 3.8.0b3 + +Fix `ImportError: cannot import name 'clock' from 'time' (unknown location)` +--- + test/math_test.py | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/test/math_test.py b/test/math_test.py +index c0bb84eb3..f22ba5e12 100644 +--- a/test/math_test.py ++++ b/test/math_test.py +@@ -2,7 +2,6 @@ + import sys + import unittest + import math +-from time import clock + import platform + + import pygame.math diff --git a/python-pygame.changes b/python-pygame.changes index 2fd6be2..a014f9d 100644 --- a/python-pygame.changes +++ b/python-pygame.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------ +Tue Oct 15 04:11:07 UTC 2019 - Steve Kowalik + +- Add python-pygame-python38-import.patch from upstream to fix a build + failure with Python 3.8. +- Use autopatch macro rather than patch0, due to multiple patches. + ------------------------------------------------------------------- Mon May 20 08:46:49 UTC 2019 - pgajdos@suse.com diff --git a/python-pygame.spec b/python-pygame.spec index f085239..73f4cae 100644 --- a/python-pygame.spec +++ b/python-pygame.spec @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# Please submit bugfixes or comments via http://bugs.opensuse.org/ # @@ -23,10 +23,11 @@ Release: 0 Summary: A Python Module for Interfacing with the SDL Multimedia Library License: LGPL-2.1-or-later Group: Development/Libraries/Python -URL: https://github.com/pygame/pygame +Url: https://github.com/pygame/pygame Source0: https://files.pythonhosted.org/packages/source/p/pygame/pygame-%{version}.tar.gz # Do not test mp3 format; whe have that support disabled in SDL1 Patch0: python-pygame-test-no-mp3.patch +Patch1: python-pygame-python38-import.patch BuildRequires: %{python_module devel} BuildRequires: %{python_module numpy} BuildRequires: %{python_module setuptools} @@ -89,7 +90,7 @@ This package contains documentation and example programs for Pygame. %prep %setup -q -n pygame-%{version} -%patch0 -p1 +%autopatch -p1 sed -i 's/\r$//' docs/reST/ref/code_examples/draw_module_example.py sed -i 's/\r$//' docs/reST/ref/code_examples/joystick_calls.py # Fix wrong-script-interpreter