[PyOpenGL] First try with python3 interface built; Cleanup setuptools BR and redundant dep; Drop obsoleted macr
Christopher Meng
cicku at fedoraproject.org
Mon May 5 11:58:57 UTC 2014
commit 5a2f16ffe9a31b3f75fc50aee806c42d0898d720
Author: Christopher Meng <i at cicku.me>
Date: Mon May 5 19:57:31 2014 +0800
First try with python3 interface built;
Cleanup setuptools BR and redundant dep;
Drop obsoleted macros;
Premature %files section to calculate file names.
PyOpenGL.spec | 81 ++++++++++++++++++++++++++++++++++++++------------------
1 files changed, 55 insertions(+), 26 deletions(-)
---
diff --git a/PyOpenGL.spec b/PyOpenGL.spec
index e6d03f6..72772ce 100644
--- a/PyOpenGL.spec
+++ b/PyOpenGL.spec
@@ -1,9 +1,8 @@
Name: PyOpenGL
Version: 3.1.0b2
Release: 1%{?dist}
-Summary: Python bindings for OpenGL
+Summary: Python 2.x bindings for OpenGL
License: BSD
-Group: System Environment/Libraries
URL: http://pyopengl.sourceforge.net/
# It was reported in https://bugzilla.redhat.com/show_bug.cgi?id=760366
# that there are some binary blobs in the upstream archive.
@@ -14,13 +13,11 @@ URL: http://pyopengl.sourceforge.net/
#
# fcami - NB: The directory to remove is OpenGL/DLLS/
Source0: https://pypi.python.org/packages/source/P/%{name}/%{name}-%{version}.tar.gz
-BuildRequires: python2-devel
-BuildRequires: python-setuptools-devel
BuildArch: noarch
-Requires: numpy python-setuptools freeglut
-# in some other repositories this is named python-opengl
-Provides: python-opengl = %{version}-%{release}
-Obsoletes: python-opengl < %{version}-%{release}
+BuildRequires: python2-devel
+BuildRequires: python-setuptools
+Requires: freeglut
+Requires: numpy
%description
PyOpenGL is the cross platform Python binding to OpenGL and related APIs. It
@@ -31,40 +28,72 @@ implementation).
PyOpenGL is interoperable with a large number of external GUI libraries
for Python including (Tkinter, wxPython, FxPy, PyGame, and Qt).
-%package Tk
+%package -n python3-%{name}
+Summary: Python 3.x bindings for OpenGL
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+Requires: freeglut
+Requires: numpy
+
+%description -n python3-%{name}
+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
+Requires: %{name} = %{version}-%{release}
+Requires: tkinter
-%description Tk
+%description Tk
%{name} Togl (Tk OpenGL widget) 1.6 support.
%prep
-%setup -q -n %{name}-%{version}
+%setup -q
+rm -rf %{py3dir}
+cp -a . %{py3dir}
%build
-%{__python} setup.py build
+%{__python2} setup.py build
+pushd %{py3dir}
+%{__python3} setup.py build
+popd
%install
-%{__python} setup.py install -O1 --skip-build --root="$RPM_BUILD_ROOT" \
- --prefix="%{_prefix}"
-find %{buildroot}%{python_sitelib}/%{name}-%{version}-py?.?.egg-info \
- -type f -exec chmod -x '{}' \;
-find %{buildroot}%{python_sitelib} -name "buffers.py" \
- -type f -exec chmod +x '{}' \;
-find %{buildroot}%{python_sitelib} -name "_buffers.py" \
- -type f -exec chmod +x '{}' \;
+%{__python2} setup.py install -O1 --skip-build --root="%{buildroot}" --prefix="%{_prefix}"
+pushd %{py3dir}
+%{__python3} setup.py install -O1 --skip-build --root="%{buildroot}" --prefix="%{_prefix}"
+popd
+
+#find %{buildroot}%{python2_sitelib}/%{name}-%{version}-py?.?.egg-info \
+# -type f -exec chmod -x '{}' \;
+#find %{buildroot}%{python2_sitelib} -name "buffers.py" \
+# -type f -exec chmod +x '{}' \;
+#find %{buildroot}%{python2_sitelib} -name "_buffers.py" \
+# -type f -exec chmod +x '{}' \;
%files
%doc license.txt
-%{python_sitelib}/*OpenGL*
-%exclude %{python_sitelib}/OpenGL/Tk
+#%{python2_sitelib}/*OpenGL*
+%exclude %{python2_sitelib}/OpenGL/Tk
+
+%files -n python3-%{name}
+%doc COPYRIGHT README.md
+#%{python3_sitelib}/%{name}-%{version}-py%{python3_version}.egg-info
+#%{python3_sitelib}/
%files Tk
-%defattr(-,root,root,-)
-%{python_sitelib}/OpenGL/Tk
+%{python2_sitelib}/OpenGL/Tk
%changelog
+* Mon May 05 2014 Christopher Meng <rpm at cicku.me> - 3.1.0b2-1
+- Build python3 interface.
+- Drop unneeded dependencies.
+
* Fri Apr 11 2014 François Cami <fcami at fedoraproject.org> - 3.1.0b2-1
- Update to latest upstream.
More information about the scm-commits
mailing list