Enable upstream tests

This commit is contained in:
Scott Talbert 2023-01-26 15:21:09 -05:00
parent 7b87f4785d
commit e5ba37e37c
1 changed files with 20 additions and 5 deletions

View File

@ -10,6 +10,19 @@ URL: https://github.com/mcfletch/pyopengl
Source0: https://pypi.python.org/packages/source/P/%{srcname}/%{srcname}-%{version}.tar.gz
Source1: https://pypi.python.org/packages/source/P/%{srcname}-accelerate/%{srcname}-accelerate-%{version}.tar.gz
BuildRequires: gcc
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-numpy
BuildRequires: python3-Cython
# For tests
BuildRequires: mesa-dri-drivers
BuildRequires: mesa-libGLU
BuildRequires: python3-pygame
BuildRequires: python3-pytest
BuildRequires: xorg-x11-server-Xvfb
%description
PyOpenGL is the cross platform Python binding to OpenGL and related APIs. It
includes support for OpenGL v1.1, GLU, GLUT v3.7, GLE 3 and WGL 4. It also
@ -22,11 +35,6 @@ for Python including (Tkinter, wxPython, FxPy, PyGame, and Qt).
%package -n python3-%{shortname}
Summary: Python 3 bindings for OpenGL
BuildRequires: gcc
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-numpy
BuildRequires: python3-Cython
Requires: freeglut
Requires: python3-numpy
%{?python_provide:%python_provide python3-%{shortname}}
@ -88,6 +96,12 @@ sed -i -e '/^#! \//, 1d' buffers.py _buffers.py
popd
%check
PYTHONPATH=%{buildroot}%{python3_sitearch}:%{buildroot}%{python3_sitelib} \
xvfb-run -a -s "-screen 0 1024x768x24 -ac +extension GLX +render -noreset" \
pytest %{srcname}-%{version}/tests
%files -n python3-%{shortname}
%license %{srcname}-%{version}/license.txt
%{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info
@ -104,6 +118,7 @@ popd
%changelog
* Thu Jan 26 2023 Scott Talbert <swt@techie.net> - 3.1.6-1
- Update to new upstream release 3.1.6 (#2056226)
- Enable upstream tests
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.5-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild