%define prever b1 %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} Name: PyOpenGL Version: 3.0.0 Release: 0.5.%{prever}%{?dist}.eye Summary: Python bindings for OpenGL License: BSD Group: System Environment/Libraries URL: http://pyopengl.sourceforge.net/ Source0: http://downloads.sourceforge.net/pyopengl/%{name}-%{version}%{prever}.tar.gz #Patch0: PyOpenGL-3.0.0b1-shebang.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: python-devel python-setuptools-devel BuildArch: noarch Requires: python-numeric python-setuptools libGL libGLU freeglut # in some other repositories this is named python-opengl Provides: python-opengl = %{version}-%{release} Obsoletes: python-opengl < %{version}-%{release} %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 includes support for dozens of extensions (where supported in the underlying implementation). PyOpenGL is interoperable with a large number of external GUI libraries for Python including (Tkinter, wxPython, FxPy, PyGame, and Qt). %package Tk Summary: %{name} OpenGL Tk widget Group: System Environment/Libraries Requires: %{name} = %{version}-%{release}, tkinter %description Tk %{name} Togl (Tk OpenGL widget) 1.6 support. %package doc Summary: Documentation files for %{name} Group: Development/Languages Requires: %{name} = %{version}-%{release} %description doc Documentation files for %{name}. %prep %setup -q -n %{name}-%{version}%{prever} #%patch0 -p1 -z .shebang %build python setup.py build %install rm -rf $RPM_BUILD_ROOT python setup.py install -O1 --skip-build --root="$RPM_BUILD_ROOT" \ --prefix="%{_prefix}" --single-version-externally-managed # don't package the tests files rm -r $RPM_BUILD_ROOT%{python_sitelib}/OpenGL/tests # for %%doc rm documentation/pydoc/builddocs.py documentation/buildepydoc.py %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc license.txt %{python_sitelib}/*OpenGL* %exclude %{python_sitelib}/OpenGL/Tk %files Tk %defattr(-,root,root,-) %{python_sitelib}/OpenGL/Tk %files doc %defattr(-,root,root,-) %doc documentation/* %changelog * Fri Jun 27 2008 Steve Castellotti 3.0.0-0.5.b1 - Change BuildRequiresL python-setuptools to python-setuptools-devel for the python-setuptools package split * Thu Aug 30 2007 Hans de Goede 3.0.0-0.4.a6 - Change BuildRequiresL python-setuptools to python-setuptools-devel for the python-setuptools package split * Fri Apr 13 2007 Hans de Goede 3.0.0-0.3.a6 - Add missing freeglut, libGL and libGLU requires (bz 236159) * Thu Mar 29 2007 Hans de Goede 3.0.0-0.2.a6 - Remove tests from the package (bz 234121) - Add -Tk subpackage (bz 234121) - Remove shebang from files with shebang instead of chmod +x (bz 234121) - Better description * Sat Mar 24 2007 Hans de Goede 3.0.0-0.1.a6 - Initial Fedora Extras package