From 454333cf08a08de39fd3c9e8105cea9835ddb62f Mon Sep 17 00:00:00 2001 From: Jiri Popelka Date: Nov 23 2015 12:57:07 +0000 Subject: python2 subpackage --- diff --git a/python-cups.spec b/python-cups.spec index e04823e..8288eef 100644 --- a/python-cups.spec +++ b/python-cups.spec @@ -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,13 +14,20 @@ BuildRequires: cups-devel BuildRequires: python2-devel python3-devel BuildRequires: epydoc +%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(python-cups) +# if python_provide() is defined, call python_provide(python2-cups) # which may eventually add Provides: ... (see the function definition) -%{?python_provide:%python_provide python-cups} +%{?python_provide:%python_provide python2-cups} -%description -This package provides Python bindings for CUPS API, +%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. @@ -29,12 +36,10 @@ 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 - 1.9.72-6 +- python2 subpackage + * Fri Nov 20 2015 Jiri Popelka - 1.9.72-5 - do not use py3dir - use python_provide macro