Remove Python 2 support

This commit is contained in:
Scott Talbert 2019-11-18 21:07:44 -05:00
parent 8438d594c9
commit 4b08fdf265

View File

@ -3,7 +3,7 @@
Name: python-%{shortname}
Version: 3.1.1a1
Release: 20%{?dist}
Release: 21%{?dist}
Summary: Python bindings for OpenGL
License: BSD
URL: https://github.com/mcfletch/pyopengl
@ -24,28 +24,9 @@ PyOpenGL is inter-operable with a large number of external GUI libraries
for Python including (Tkinter, wxPython, FxPy, PyGame, and Qt).
%package -n python2-%{shortname}
Summary: Python 2 bindings for OpenGL
BuildRequires: gcc
BuildRequires: python2-devel
BuildRequires: python2-setuptools
BuildRequires: python2-numpy
Requires: freeglut
Requires: python2-numpy
%{?python_provide:%python_provide python2-%{shortname}}
%description -n python2-%{shortname}
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 inter-operable with a large number of external GUI libraries
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
@ -110,7 +91,6 @@ popd
for dir in %{srcname}-%{version} %{srcname}-accelerate-%{version} ; do
pushd $dir
%py3_build
%py2_build
popd
done
@ -118,35 +98,20 @@ done
%install
for dir in %{srcname}-%{version} %{srcname}-accelerate-%{version} ; do
pushd $dir
%py2_install
%py3_install
popd
done
# Fix up perms on compiled object files
find %{buildroot}%{python2_sitearch}/OpenGL_accelerate/ -name *.so -exec chmod 755 '{}' \;
find %{buildroot}%{python3_sitearch}/OpenGL_accelerate/ -name *.so -exec chmod 755 '{}' \;
# Remove shebangs - note that weirdly these files have a space between
# the #! and the /, so this sed recipe is not the usual one
pushd %{buildroot}%{python2_sitelib}/OpenGL/arrays
sed -i -e '/^#! \//, 1d' buffers.py _buffers.py
popd
pushd %{buildroot}%{python3_sitelib}/OpenGL/arrays
sed -i -e '/^#! \//, 1d' buffers.py _buffers.py
popd
%files -n python2-%{shortname}
%license %{srcname}-%{version}/license.txt
%{python2_sitelib}/%{srcname}-%{version}-py%{python2_version}.egg-info
%{python2_sitelib}/OpenGL/
%exclude %{python2_sitelib}/OpenGL/Tk
%{python2_sitearch}/OpenGL_accelerate/
%{python2_sitearch}/%{srcname}_accelerate-%{version}-py%{python2_version}.egg-info/
%files -n python3-%{shortname}
%license %{srcname}-%{version}/license.txt
%{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info
@ -161,6 +126,9 @@ popd
%changelog
* Tue Nov 19 2019 Scott Talbert <swt@techie.net> - 3.1.1a1-21
- Remove Python 2 support
* Fri Oct 04 2019 Gwyn Ciesla <gwync@protonmail.com> - 3.1.1a1-20
- Rebuilt for new freeglut