File python3-opengl.spec of Package python3-opengl

# spec file for package python3-opengl
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

Name:           python3-opengl
%define tarname PyOpenGL
Version:        3.1.0
Release:        0
Summary:        OpenGL bindings for Python
License:        BSD-3-Clause
Group:          Development/Libraries/Python
BuildRequires:  fdupes
BuildRequires:  freeglut-devel
BuildRequires:  libdrm-devel
BuildRequires:  python3
BuildRequires:  python3-2to3
BuildRequires:  python3-devel
BuildRequires:  python3-Pillow
BuildRequires:  python3-numpy
BuildRequires:  swig
BuildRequires:  tk-devel
BuildRequires:  xorg-x11
Requires:       python3-numpy
Requires:       tk >= 8.1
Recommends:     python3-opengl-accelerate
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
# this is only noarch as long as the accelerator module is missing
%if %{?suse_version: 0%{?suse_version} > 1110} %{!?suse_version:1}
BuildRequires:  libgle-devel
BuildArch:      noarch
BuildRequires:  gle

OpenGL bindings for Python including support for GL extensions, GLU,
WGL, GLUT, GLE, and Tk.

%setup -q -n %{tarname}-%{version}

CFLAGS="%{optflags} -DGLX_GLXEXT_LEGACY" python3 build

python3 install --prefix=%{_prefix} --root=%{buildroot}
chmod a+x %{buildroot}%{python3_sitelib}/OpenGL/arrays/
chmod a+x %{buildroot}%{python3_sitelib}/OpenGL/arrays/
%fdupes %{buildroot}%{python3_sitelib}/OpenGL/

rm -rf %{buildroot}

%doc license.txt

openSUSE Build Service is sponsored by