From 68e3ff8d1b39b035e6cf742581eb04c151d99698dd930a951d171d0818d77c71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 19 Aug 2019 09:11:16 +0000 Subject: [PATCH 1/3] Accepting request 724516 from home:jayvdb:branches:devel:languages:python Update to latest beta plus other adjustments OBS-URL: https://build.opensuse.org/request/show/724516 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-opengl?expand=0&rev=24 --- PyOpenGL-3.1.3b1.tar.gz | 3 --- PyOpenGL-3.1.3b2.tar.gz | 3 +++ python-opengl.changes | 18 +++++++++++++ python-opengl.spec | 59 ++++++++++++++++++++++++++++++++--------- 4 files changed, 68 insertions(+), 15 deletions(-) delete mode 100644 PyOpenGL-3.1.3b1.tar.gz create mode 100644 PyOpenGL-3.1.3b2.tar.gz diff --git a/PyOpenGL-3.1.3b1.tar.gz b/PyOpenGL-3.1.3b1.tar.gz deleted file mode 100644 index fefc605..0000000 --- a/PyOpenGL-3.1.3b1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:85cd5372636b8bda173a261b0d572500b2a3432105eaad1311ecd61b372bd6e8 -size 1815909 diff --git a/PyOpenGL-3.1.3b2.tar.gz b/PyOpenGL-3.1.3b2.tar.gz new file mode 100644 index 0000000..00deb52 --- /dev/null +++ b/PyOpenGL-3.1.3b2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ac73b4c0b433be02d6a55b9ed768acf07003a92a3315ba9d62bc8f8da5f0c291 +size 1816589 diff --git a/python-opengl.changes b/python-opengl.changes index dc1da38..276d53a 100644 --- a/python-opengl.changes +++ b/python-opengl.changes @@ -1,3 +1,21 @@ +------------------------------------------------------------------- +Sun Aug 18 05:11:27 UTC 2019 - John Vandenberg + +- Remove CFLAGS for noarch package +- Use setuptools to build the package +- Expand scope of fdupes to include egg-info +- Activate test suite, disabled using bcond check on platforms + without test dependency pygame, and with test_buffer_api_basic + disabled on platforms other than x86_64 and aarch64 due to + failures caused by the installation of opengel-accelerate +- Change optional dependencies tk and numpy to Recommends + instead of mandatory run time dependencies +- Add missing python-tk to Recommends to complement tk +- Change mtime adjustment algorithm to be more reflective of the + source date, based on OpenGL/__init__.py instead of .changes +- Upgrade to 3.1.3b2 + - Python 3.7 compatibility fixes + ------------------------------------------------------------------- Tue Dec 4 12:51:01 UTC 2018 - Matej Cepl diff --git a/python-opengl.spec b/python-opengl.spec index c66c174..e13f21d 100644 --- a/python-opengl.spec +++ b/python-opengl.spec @@ -1,7 +1,7 @@ # # spec file for package python-opengl # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,30 +16,53 @@ # +# The tests depend on pygame, which is not available on all arch +%ifarch %{arm} aarch64 x86_64 %{ix86} +%bcond_without check +%else +%bcond_with check +%endif +%ifarch x86_64 aarch64 +%bcond_without test_buffer_api_basic +%else +%bcond_with test_buffer_api_basic +%endif %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define tarname PyOpenGL Name: python-opengl -Version: 3.1.3b1 +Version: 3.1.3b2 Release: 0 Summary: OpenGL bindings for Python License: BSD-3-Clause Group: Development/Libraries/Python URL: http://pyopengl.sourceforge.net Source0: https://files.pythonhosted.org/packages/source/P/%{tarname}/%{tarname}-%{version}.tar.gz -Source1: %{name}.changes +BuildRequires: %{python_module setuptools} +%if %{with check} BuildRequires: %{python_module Pillow} -BuildRequires: %{python_module numpy} -BuildRequires: fdupes +BuildRequires: %{python_module opengl-accelerate} +BuildRequires: %{python_module psutil} +BuildRequires: %{python_module pygame} +BuildRequires: %{python_module pytest} +BuildRequires: Mesa-dri BuildRequires: freeglut-devel BuildRequires: libdrm-devel BuildRequires: libgle-devel -BuildRequires: python-rpm-macros +BuildRequires: python3-numpy BuildRequires: swig BuildRequires: tk-devel -BuildRequires: xorg-x11 -Requires: python-numpy -Requires: tk >= 8.1 +BuildRequires: xvfb-run +BuildRequires: pkgconfig(gl) +BuildRequires: pkgconfig(glu) +BuildRequires: pkgconfig(x11) +BuildRequires: pkgconfig(xcb-glx) +%endif +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Recommends: python-numpy Recommends: python-opengl-accelerate +Recommends: python-tk +Recommends: tk >= 8.1 BuildArch: noarch %python_subpackages @@ -52,16 +75,28 @@ WGL, GLUT, GLE, and Tk. # remove shebang sed -e '1d' -i OpenGL/arrays/_buffers.py OpenGL/arrays/buffers.py # avoid "python-bytecode-inconsistent-mtime" warning -FAKE_TIMESTAMP=$(LC_ALL=C date -u -r %{SOURCE1} +%%y%%m%%d%%H%%M) +FAKE_TIMESTAMP=$(LC_ALL=C date -u -r OpenGL/__init__.py +%%y%%m%%d%%H%%M) find . -name '*.py' -exec touch -mat $FAKE_TIMESTAMP {} \; %build -export CFLAGS="%{optflags} -DGLX_GLXEXT_LEGACY" %python_build %install %python_install -%python_expand %fdupes -s %{buildroot}%{$python_sitelib}/OpenGL/ +%python_expand %fdupes -s %{buildroot}%{$python_sitelib} + +%if %{with check} +%check +# test_buffer_api_basic is a test specific to opengl-accelerate, failing on i586 and armv7l +# https://github.com/mcfletch/pyopengl/issues/29 +%{python_expand # +%if %{with test_buffer_api_basic} +xvfb-run -s "-screen 0 1400x900x24 +iglx" $python -m pytest -v tests +%else +xvfb-run -s "-screen 0 1400x900x24 +iglx" $python -m pytest -v tests -k "not test_buffer_api_basic" +%endif +} +%endif %files %{python_files} %license license.txt From 382416f1acf3ab89c30ca99108d061b6a49f38352231558fd02570367abce7eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 19 Aug 2019 09:11:52 +0000 Subject: [PATCH 2/3] OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-opengl?expand=0&rev=25 --- python-opengl.spec | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/python-opengl.spec b/python-opengl.spec index e13f21d..45b6752 100644 --- a/python-opengl.spec +++ b/python-opengl.spec @@ -16,6 +16,8 @@ # +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +%define tarname PyOpenGL # The tests depend on pygame, which is not available on all arch %ifarch %{arm} aarch64 x86_64 %{ix86} %bcond_without check @@ -27,8 +29,6 @@ %else %bcond_with test_buffer_api_basic %endif -%{?!python_module:%define python_module() python-%{**} python3-%{**}} -%define tarname PyOpenGL Name: python-opengl Version: 3.1.3b2 Release: 0 @@ -38,6 +38,13 @@ Group: Development/Libraries/Python URL: http://pyopengl.sourceforge.net Source0: https://files.pythonhosted.org/packages/source/P/%{tarname}/%{tarname}-%{version}.tar.gz BuildRequires: %{python_module setuptools} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Recommends: python-numpy +Recommends: python-opengl-accelerate +Recommends: python-tk +Recommends: tk >= 8.1 +BuildArch: noarch %if %{with check} BuildRequires: %{python_module Pillow} BuildRequires: %{python_module opengl-accelerate} @@ -57,13 +64,6 @@ BuildRequires: pkgconfig(glu) BuildRequires: pkgconfig(x11) BuildRequires: pkgconfig(xcb-glx) %endif -BuildRequires: fdupes -BuildRequires: python-rpm-macros -Recommends: python-numpy -Recommends: python-opengl-accelerate -Recommends: python-tk -Recommends: tk >= 8.1 -BuildArch: noarch %python_subpackages %description @@ -83,7 +83,7 @@ find . -name '*.py' -exec touch -mat $FAKE_TIMESTAMP {} \; %install %python_install -%python_expand %fdupes -s %{buildroot}%{$python_sitelib} +%python_expand %fdupes %{buildroot}%{$python_sitelib} %if %{with check} %check From 82ac52d8a65c29f085a85b381377ae2811311d77cab96cdf9ff22be46b280698 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 9 Sep 2019 10:14:06 +0000 Subject: [PATCH 3/3] - Switch to multibuild to avoid buildcycle OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-opengl?expand=0&rev=26 --- _multibuild | 3 +++ python-opengl.changes | 5 +++++ python-opengl.spec | 33 +++++++++++++++------------------ 3 files changed, 23 insertions(+), 18 deletions(-) create mode 100644 _multibuild diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..fcc7b97 --- /dev/null +++ b/_multibuild @@ -0,0 +1,3 @@ + + test + diff --git a/python-opengl.changes b/python-opengl.changes index 276d53a..c9dd6d9 100644 --- a/python-opengl.changes +++ b/python-opengl.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Sep 9 09:30:18 UTC 2019 - Tomáš Chvátal + +- Switch to multibuild to avoid buildcycle + ------------------------------------------------------------------- Sun Aug 18 05:11:27 UTC 2019 - John Vandenberg diff --git a/python-opengl.spec b/python-opengl.spec index 45b6752..ec54fcf 100644 --- a/python-opengl.spec +++ b/python-opengl.spec @@ -17,19 +17,16 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} +%global flavor @BUILD_FLAVOR@%{nil} +%if "%{flavor}" == "test" +%define psuffix -test +%bcond_without test +%else +%define psuffix %{nil} +%bcond_with test +%endif %define tarname PyOpenGL -# The tests depend on pygame, which is not available on all arch -%ifarch %{arm} aarch64 x86_64 %{ix86} -%bcond_without check -%else -%bcond_with check -%endif -%ifarch x86_64 aarch64 -%bcond_without test_buffer_api_basic -%else -%bcond_with test_buffer_api_basic -%endif -Name: python-opengl +Name: python-opengl%{psuffix} Version: 3.1.3b2 Release: 0 Summary: OpenGL bindings for Python @@ -45,7 +42,7 @@ Recommends: python-opengl-accelerate Recommends: python-tk Recommends: tk >= 8.1 BuildArch: noarch -%if %{with check} +%if %{with test} BuildRequires: %{python_module Pillow} BuildRequires: %{python_module opengl-accelerate} BuildRequires: %{python_module psutil} @@ -82,25 +79,25 @@ find . -name '*.py' -exec touch -mat $FAKE_TIMESTAMP {} \; %python_build %install +%if !%{with test} %python_install %python_expand %fdupes %{buildroot}%{$python_sitelib} +%endif -%if %{with check} +%if %{with test} %check # test_buffer_api_basic is a test specific to opengl-accelerate, failing on i586 and armv7l # https://github.com/mcfletch/pyopengl/issues/29 %{python_expand # -%if %{with test_buffer_api_basic} -xvfb-run -s "-screen 0 1400x900x24 +iglx" $python -m pytest -v tests -%else xvfb-run -s "-screen 0 1400x900x24 +iglx" $python -m pytest -v tests -k "not test_buffer_api_basic" -%endif } %endif +%if !%{with test} %files %{python_files} %license license.txt %{python_sitelib}/OpenGL/ %{python_sitelib}/PyOpenGL-%{version}-py%{python_version}.egg-info +%endif %changelog