Drop python2.

This commit is contained in:
Gwyn Ciesla 2018-09-28 10:44:59 -05:00
parent 8aec83c292
commit b93adbcb4d
1 changed files with 5 additions and 35 deletions

View File

@ -1,8 +1,3 @@
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
# python-gpod should not advertise _gpod.so in its Provides
%define __provides_exclude_from %{python_sitearch}/.*\.so$
# If banshee ever stablizes around gtk3, we need to flip this on. # If banshee ever stablizes around gtk3, we need to flip this on.
%global with_gtk3 0 %global with_gtk3 0
@ -18,9 +13,8 @@
Summary: Library to access the contents of an iPod Summary: Library to access the contents of an iPod
Name: libgpod Name: libgpod
Version: 0.8.3 Version: 0.8.3
Release: 24%{?dist} Release: 25%{?dist}
License: LGPLv2+ License: LGPLv2+
Group: System Environment/Libraries
URL: http://www.gtkpod.org/libgpod.html URL: http://www.gtkpod.org/libgpod.html
Source0: http://downloads.sourceforge.net/gtkpod/%{name}-%{version}.tar.bz2 Source0: http://downloads.sourceforge.net/gtkpod/%{name}-%{version}.tar.bz2
@ -49,9 +43,6 @@ BuildRequires: gtk-sharp3-devel
BuildRequires: gtk-sharp2-devel BuildRequires: gtk-sharp2-devel
%endif %endif
%endif %endif
BuildRequires: pygobject2-devel
BuildRequires: python2-devel
BuildRequires: python2-mutagen
BuildRequires: sg3_utils-devel BuildRequires: sg3_utils-devel
BuildRequires: sqlite-devel BuildRequires: sqlite-devel
BuildRequires: swig BuildRequires: swig
@ -91,18 +82,6 @@ smart playlists, playcounts, ratings, podcasts, album artwork, photos, etc.
This package contains the API documentation. This package contains the API documentation.
%package -n python2-gpod
%{?python_provide:%python_provide python2-gpod}
Summary: Python module to access iPod content
Group: Development/Languages
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: python2-mutagen
%description -n python2-gpod
A python module to access iPod content. This module provides bindings to the
libgpod library.
%if %{with_mono} %if %{with_mono}
%package sharp %package sharp
Summary: C#/.NET library to access iPod content Summary: C#/.NET library to access iPod content
@ -136,9 +115,6 @@ libgpod-sharp.
%patch2 -p1 -b .mono4 %patch2 -p1 -b .mono4
%patch3 -p1 -b .playcounts %patch3 -p1 -b .playcounts
# remove execute perms on the python examples as they'll be installed in %%doc
chmod -x bindings/python/examples/*.py
%if %{with_gtk3} %if %{with_gtk3}
sed -i "s#sharp-2.0#sharp-3.0#g" bindings/mono/libgpod-sharp/libgpod-sharp.pc.in sed -i "s#sharp-2.0#sharp-3.0#g" bindings/mono/libgpod-sharp/libgpod-sharp.pc.in
sed -i "s#public DateTime#public System.DateTime#g" bindings/mono/libgpod-sharp/Artwork.cs sed -i "s#public DateTime#public System.DateTime#g" bindings/mono/libgpod-sharp/Artwork.cs
@ -150,7 +126,7 @@ autoreconf -vif
sed -i "s#sharp-2.0#sharp-3.0#g" configure sed -i "s#sharp-2.0#sharp-3.0#g" configure
%endif %endif
%configure --with-python=/usr/bin/python2 --without-hal --enable-udev --with-temp-mount-dir=/run/%{name} %configure --without-hal --enable-udev --with-temp-mount-dir=/run/%{name}
make %{?_smp_mflags} V=1 make %{?_smp_mflags} V=1
@ -160,9 +136,6 @@ make DESTDIR=%{buildroot} install
mkdir -p %{buildroot}/%{_libdir}/libgpod mkdir -p %{buildroot}/%{_libdir}/libgpod
# remove Makefiles from the python examples dir
rm -rf bindings/python/examples/Makefile*
%if %{with_mono} %if %{with_mono}
# remove execute perms from some libgpod-sharp files # remove execute perms from some libgpod-sharp files
chmod -x %{buildroot}/%{_libdir}/%{name}/*.dll.config chmod -x %{buildroot}/%{_libdir}/%{name}/*.dll.config
@ -209,12 +182,6 @@ find %{buildroot} -type f -name "*.a" -delete
%files doc %files doc
%{_datadir}/gtk-doc %{_datadir}/gtk-doc
%files -n python2-gpod
%doc COPYING bindings/python/README bindings/python/examples
%{python2_sitearch}/gpod
%if %{with_mono} %if %{with_mono}
%files sharp %files sharp
%{_libdir}/%{name}/%{name}-sharp* %{_libdir}/%{name}/%{name}-sharp*
@ -225,6 +192,9 @@ find %{buildroot} -type f -name "*.a" -delete
%endif %endif
%changelog %changelog
* Fri Sep 28 2018 Gwyn Ciesla <limburgher@gmail.com> - 0.8.3-25
- Drop python2.
* Tue Jul 24 2018 Christophe Fergeau <cfergeau@redhat.com> - 0.8.3-24 * Tue Jul 24 2018 Christophe Fergeau <cfergeau@redhat.com> - 0.8.3-24
- Fix build with python2 - Fix build with python2