14
0
forked from pool/python-pygame

Accepting request 616582 from home:TheBlackCat:branches:devel:languages:python

- Get tests working.

OBS-URL: https://build.opensuse.org/request/show/616582
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pygame?expand=0&rev=17
This commit is contained in:
Tomáš Chvátal
2018-06-13 16:47:41 +00:00
committed by Git OBS Bridge
parent 84dd655a61
commit b213527c3c
2 changed files with 29 additions and 18 deletions

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Wed Jun 13 14:54:51 UTC 2018 - toddrme2178@gmail.com
- Get tests working.
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Aug 17 22:13:05 UTC 2017 - jengelh@inai.de Thu Aug 17 22:13:05 UTC 2017 - jengelh@inai.de

View File

@@ -1,7 +1,7 @@
# #
# spec file for package python-pygame # spec file for package python-pygame
# #
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@@ -16,8 +16,6 @@
# #
# There are font issues in the test environment
%bcond_with test
%{?!python_module:%define python_module() python-%{**} python3-%{**}} %{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-pygame Name: python-pygame
@@ -27,22 +25,32 @@ Source0: https://files.pythonhosted.org/packages/source/P/Pygame/pygame-%
Summary: A Python Module for Interfacing with the SDL Multimedia Library Summary: A Python Module for Interfacing with the SDL Multimedia Library
License: LGPL-2.1+ License: LGPL-2.1+
Group: Development/Libraries/Python Group: Development/Libraries/Python
Url: http://www.pygame.org/ Url: https://github.com/pygame/pygame
BuildRequires: %{python_module devel} BuildRequires: %{python_module devel}
BuildRequires: %{python_module numpy} BuildRequires: %{python_module numpy}
BuildRequires: %{python_module setuptools} BuildRequires: %{python_module setuptools}
BuildRequires: SDL_image-devel BuildRequires: config(fluid-soundfont-gm)
BuildRequires: SDL_mixer-devel BuildRequires: pkgconfig(SDL_image)
BuildRequires: SDL_ttf-devel BuildRequires: pkgconfig(SDL_mixer)
BuildRequires: pkgconfig(SDL_ttf)
BuildRequires: pkgconfig(freetype2)
BuildRequires: pkgconfig(libjpeg)
BuildRequires: pkgconfig(libpng)
BuildRequires: pkgconfig(sdl)
BuildRequires: pkgconfig(x11)
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: fontconfig BuildRequires: fontconfig
BuildRequires: freetype2-devel BuildRequires: libtiff-devel
BuildRequires: libjpeg-devel
BuildRequires: libpng-devel
BuildRequires: libv4l-devel >= 0.8.4 BuildRequires: libv4l-devel >= 0.8.4
BuildRequires: portmidi-devel BuildRequires: portmidi-devel
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
BuildRequires: xorg-x11 BuildRequires: xorg-x11
BuildRequires: xorg-x11-devel
BuildRequires: xorg-x11-fonts
BuildRequires: xorg-x11-fonts-100dpi
BuildRequires: xorg-x11-fonts-75dpi
BuildRequires: xorg-x11-fonts-core
BuildRequires: xorg-x11-fonts-cyrillic
Requires: fontconfig Requires: fontconfig
Requires: python-numpy Requires: python-numpy
%ifpython2 %ifpython2
@@ -94,6 +102,7 @@ export CFLAGS="%{optflags} -fno-strict-aliasing"
%python_build %python_build
%install %install
export CFLAGS="%{optflags} -fno-strict-aliasing"
%python_install %python_install
%{python_expand pushd %{buildroot}%{$python_sitearch} %{python_expand pushd %{buildroot}%{$python_sitearch}
sed -i "s|^#!/usr/bin/env python$|#!%{__python3}|" pygame/tests/test_utils/png.py sed -i "s|^#!/usr/bin/env python$|#!%{__python3}|" pygame/tests/test_utils/png.py
@@ -109,29 +118,26 @@ $python -O -m compileall -d %{$python_sitearch} pygame/tests/test_utils/
popd popd
} }
%if %{with test}
%check %check
export SDL_VIDEODRIVER=dummy export SDL_VIDEODRIVER=dummy
export SDL_AUDIODRIVER=disk export SDL_AUDIODRIVER=disk
export LANG=en_US.UTF-8
%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitearch} %{python_expand export PYTHONPATH=%{buildroot}%{$python_sitearch}
$python -m pygame.tests.__main__ --exclude opengl --time_out 300 $python -m pygame.tests.__main__ --exclude opengl --time_out 300
} }
%endif
%files %{python_files} %files %{python_files}
%defattr(-,root,root) %doc WHATSNEW readme.html readme.rst
%doc LGPL WHATSNEW readme.html readme.rst %license LGPL
%{python_sitearch}/pygame/ %{python_sitearch}/pygame/
%{python_sitearch}/pygame-%{version}-py*.egg-info %{python_sitearch}/pygame-%{version}-py*.egg-info
%files %{python_files devel} %files %{python_files devel}
%defattr(-,root,root) %license LGPL
%doc LGPL
%{python_sysconfig_var INCLUDEPY}/pygame/ %{python_sysconfig_var INCLUDEPY}/pygame/
%files -n %{name}-doc %files -n %{name}-doc
%defattr(-,root,root) %license LGPL
%doc LGPL
%doc docs/ %doc docs/
%doc examples/ %doc examples/