1578356 - Remove python2 subpackage

This commit is contained in:
Zdenek Dohnal 2018-10-03 14:37:25 +02:00
parent 5f63555f97
commit 2da0ca49da

View File

@ -6,7 +6,7 @@
Summary: Python bindings for CUPS
Name: python-cups
Version: 1.9.74
Release: 1%{?dist}
Release: 2%{?dist}
URL: http://cyberelk.net/tim/software/pycups/
Source: http://cyberelk.net/tim/data/pycups/pycups-%{version}.tar.bz2
License: GPLv2+
@ -15,9 +15,6 @@ License: GPLv2+
BuildRequires: gcc
BuildRequires: cups-devel
%if 0%{?rhel} <= 7
BuildRequires: python2-devel
%endif
BuildRequires: python3-devel
%description
@ -25,20 +22,6 @@ This package provides Python bindings for CUPS API,
known as pycups. It was written for use with
system-config-printer, but can be put to other uses as well.
%if 0%{?rhel} <= 7
%package -n python2-cups
Summary: Python2 bindings for CUPS API, known as pycups.
# defined in /usr/lib/rpm/macros.d/macros.python
# if python_provide() is defined, call python_provide(python2-cups)
# which may eventually add Provides: ... (see the function definition)
%{?python_provide:%python_provide python2-cups}
%description -n python2-cups
This package provides Python 2 bindings for CUPS API,
known as pycups. It was written for use with
system-config-printer, but can be put to other uses as well.
%endif
%package -n python3-cups
Summary: Python3 bindings for CUPS API, known as pycups.
%{?python_provide:%python_provide python3-cups}
@ -60,30 +43,16 @@ Documentation for python-cups.
sed -i '/^#!\/usr\/bin\/python/d' examples/cupstree.py
%build
%if 0%{?rhel} <= 7
%py2_build
%endif
%py3_build
%install
make install-rpmhook DESTDIR="%{buildroot}"
%if 0%{?rhel} <= 7
%py2_install
%endif
%py3_install
export PYTHONPATH=%{buildroot}%{python3_sitearch}
%{_bindir}/pydoc3 -w cups
%{_bindir}/mkdir html
%{_bindir}/mv cups.html html
%if 0%{?rhel} <= 7
%files -n python2-cups
%doc README NEWS TODO
%license COPYING
%{python2_sitearch}/cups.so
%{python2_sitearch}/pycups*.egg-info
%endif
%files -n python3-cups
%doc README NEWS TODO
%license COPYING
@ -96,6 +65,9 @@ export PYTHONPATH=%{buildroot}%{python3_sitearch}
%doc examples html
%changelog
* Wed Oct 03 2018 Zdenek Dohnal <zdohnal@redhat.com> - 1.9.74-2
- 1578356 - Remove python2 subpackage
* Wed Sep 26 2018 Zdenek Dohnal <zdohnal@redhat.com> - 1.9.74-1
- 1.9.74