From fa23d067227411d247b5384b46aa9a1ce0a0dc61 Mon Sep 17 00:00:00 2001 From: Raphael Groner raphgro@fedoraproject.org Date: Wed, 31 Aug 2016 22:24:44 +0200 Subject: v0.4.11, python3, rhbz#1370721
--- .gitignore | 1 + krop.spec | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++++--------- sources | 2 +- 3 files changed, 57 insertions(+), 10 deletions(-)
diff --git a/.gitignore b/.gitignore index c827f8c..51dbf59 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /krop-0.4.8.tar.gz /krop-0.4.9.tar.gz /krop-0.4.10.tar.gz +/krop-0.4.11.tar.gz diff --git a/krop.spec b/krop.spec index 07ad4e8..dea4e98 100644 --- a/krop.spec +++ b/krop.spec @@ -10,9 +10,15 @@ %global pkgmgr yum %endif
+%if 0%{?fedora} >= 24 +%bcond_with python2 +%else +%bcond_without python2 +%endif + Name: krop -Version: 0.4.10 -Release: 2%{?dist} +Version: 0.4.11 +Release: 1%{?dist} Summary: Tool to crop PDF files with an eye towards eReaders License: GPLv3+ URL: http://arminstraub.com/software/krop @@ -21,16 +27,16 @@ Source0: http://arminstraub.com/downloads/%%7Bname%7D/%%7Bname%7D-%%7Bversion%7D.tar. BuildArch: noarch BuildRequires: desktop-file-utils BuildRequires: libappstream-glib -BuildRequires: python2-devel -BuildRequires: python-setuptools
-%if 0%{?fedora} >= 24 -%global pyneeds python2-PyPDF2 PyQt4 python-poppler-qt4 +%if %with python2 +BuildRequires: python2-devel +BuildRequires: python2-setuptools +Requires: python2-%{name} = %{version}-%{release} %else -%global pyneeds python-PyPDF2 PyQt4 python-poppler-qt4 +BuildRequires: python3-devel +BuildRequires: python3-setuptools +Requires: python3-%{name} = %{version}-%{release} %endif -BuildRequires: %pyneeds -Requires: %pyneeds
%description Krop is a simple graphical tool to crop the pages of PDF files. A unique feature @@ -38,6 +44,22 @@ of krop is its ability to automatically split pages into subpages to fit the limited screen size of devices such as eReaders. This is particularly useful, if your eReader does not support convenient scrolling.
+%package -n python2-%{name} +Summary: Python2 module for %{name} +Requires: python-PyPDF2 PyQt4 python-poppler-qt4 +%{?python_provide:%python_provide python2-%{name}} + +%description -n python2-%{name} +%{summary}. + +%package -n python3-%{name} +Summary: Python3 module for %{name} +Requires: python3-PyPDF2 python3-PyQt4 python3-poppler-qt4 +%{?python_provide:%python_provide python3-%{name}} + +%description -n python3-%{name} +%{summary}. +
%prep %setup -q @@ -48,16 +70,28 @@ find . -type f -name '*.py' -exec sed -i -e 's/of ubuntu/of %{osname}/Ig' \ sed -i '/^#!//, 1d' %{name}/%{name}.py
%build +%if %with python2 %py2_build +%else +%py3_build +%endif
%install +%if %with python2 %py2_install +%else +%py3_install +%endif desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{name}.desktop DESTDIR="%{buildroot}" appstream-util install %{name}.appdata.xml
%check +%if %with python2 %{__python2} setup.py check +%else +%{__python3} setup.py check +%endif appstream-util validate-relax --nonet %{buildroot}%{_datadir}/appdata/*.appdata.xml
@@ -74,11 +108,23 @@ update-desktop-database &> /dev/null || : %{_bindir}/%{name} %{_datadir}/appdata/%{name}.appdata.xml %{_datadir}/applications/%{name}.desktop + +%if %with python2 +%files -n python2-%{name} %{python2_sitelib}/%{name}-%{version}-py%{python2_version}.egg-info %{python2_sitelib}/%{name}/ +%else +%files -n python3-%{name} +%{python3_sitelib}/%{name}-%{version}-py%{python3_version}.egg-info +%{python3_sitelib}/%{name}/ +%endif
%changelog +* Wed Aug 31 2016 Raphael Groner projects.rg@smart.ms - 0.4.11-1 +- new version +- migrate to python3 and split subpackage for module + * Tue Jul 19 2016 Fedora Release Engineering rel-eng@lists.fedoraproject.org - 0.4.10-2 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Pac...
diff --git a/sources b/sources index 1e28d50..b0cc1d3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -4f03ad32e84c3788d0ab23eebf4a5a35 krop-0.4.10.tar.gz +3385d9c534ba8fea4d0341cbb12c68da krop-0.4.11.tar.gz
scm-commits@lists.fedoraproject.org