14
0

Accepting request 880827 from home:bnavigator:branches:devel:languages:python

- Don't build the numpy formathandler for python36.
  NumPy is optional and not available for python36 on Tumbleweed.
- Add test files test_arraydatatypeaccel.py and test_numpyaccel.py

OBS-URL: https://build.opensuse.org/request/show/880827
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-opengl-accelerate?expand=0&rev=16
This commit is contained in:
2021-03-24 11:29:43 +00:00
committed by Git OBS Bridge
parent 7cad447b1a
commit 3cc675ad6e
4 changed files with 221 additions and 3 deletions

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-opengl-accelerate
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -27,14 +27,19 @@ 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
# test files: GitHub repo has no tags, use commit hash
Source1: https://github.com/mcfletch/pyopengl/raw/6ec398da44/accelerate/tests/test_arraydatatypeaccel.py
Source2: https://github.com/mcfletch/pyopengl/raw/6ec398da44/accelerate/tests/test_numpyaccel.py
BuildRequires: %{python_module Cython}
BuildRequires: %{python_module devel}
BuildRequires: %{python_module numpy-devel}
BuildRequires: %{python_module opengl >= %{version}}
BuildRequires: %{python_module pytest}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-numpy
BuildRequires: %{python_module numpy-devel if (%python-base without python36-base)}
Recommends: python-numpy
Requires: python-opengl >= %{version}
Provides: python-PyOpenGL_accelerate = %{version}-%{release}
%python_subpackages
%description
@@ -57,6 +62,9 @@ export CFLAGS="%{optflags} -DGLX_GLXEXT_LEGACY"
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitearch}
%check
%pytest_arch %{SOURCE1} %{SOURCE2}
%files %{python_files}
%license license.txt
%doc README.txt