python2 subpackage

This commit is contained in:
Jiri Popelka 2015-11-23 13:53:38 +01:00
parent 20bd8655b9
commit 454333cf08

View File

@ -6,7 +6,7 @@
Summary: Python bindings for CUPS
Name: python-cups
Version: 1.9.72
Release: 5%{?dist}
Release: 6%{?dist}
URL: http://cyberelk.net/tim/software/pycups/
Source: http://cyberelk.net/tim/data/pycups/pycups-%{version}.tar.bz2
License: GPLv2+
@ -14,27 +14,32 @@ BuildRequires: cups-devel
BuildRequires: python2-devel python3-devel
BuildRequires: epydoc
# defined in /usr/lib/rpm/macros.d/macros.python
# if python_provide() is defined, call python_provide(python-cups)
# which may eventually add Provides: ... (see the function definition)
%{?python_provide:%python_provide python-cups}
%description
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.
%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.
%package -n python3-cups
Summary: Python3 bindings for CUPS API, known as pycups.
%{?python_provide:%python_provide python3-cups}
%description -n python3-cups
This package provides Python bindings for CUPS API,
This package provides Python 3 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.
This is a ported release for python 3
%package doc
Summary: Documentation for python-cups
@ -45,25 +50,25 @@ Documentation for python-cups.
%setup -n pycups-%{version}
%build
make doc
%py2_build
%py3_build
rm -rf html
epydoc -v -o html --html build/lib*/*cups.so
%install
make install-rpmhook DESTDIR="%{buildroot}"
%py2_install
%py3_install
chmod 755 %{buildroot}%{python3_sitearch}/cups*.so
%files
%doc COPYING README NEWS TODO
%{python_sitearch}/cups.so
%{python_sitearch}/pycups*.egg-info
%files -n python2-cups
%doc README NEWS TODO
%license COPYING
%{python2_sitearch}/cups.so
%{python2_sitearch}/pycups*.egg-info
%files -n python3-cups
%doc COPYING README NEWS TODO
%doc README NEWS TODO
%license COPYING
%{python3_sitearch}/cups.cpython-3*.so
%{python3_sitearch}/pycups*.egg-info
%{_rpmconfigdir}/fileattrs/psdriver.attr
@ -73,6 +78,9 @@ chmod 755 %{buildroot}%{python3_sitearch}/cups*.so
%doc examples html
%changelog
* Mon Nov 23 2015 Jiri Popelka <jpopelka@redhat.com> - 1.9.72-6
- python2 subpackage
* Fri Nov 20 2015 Jiri Popelka <jpopelka@redhat.com> - 1.9.72-5
- do not use py3dir
- use python_provide macro