[krop] Use versioned python2 macro.

Christopher Meng cicku at fedoraproject.org
Tue Dec 31 09:07:09 UTC 2013


commit e4b307a2415366dfb30f0fb3a9d4ae7a8514324f
Author: Christopher Meng <i at cicku.me>
Date:   Tue Dec 31 17:06:41 2013 +0800

    Use versioned python2 macro.

 krop.spec |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)
---
diff --git a/krop.spec b/krop.spec
index ad249be..cfa0c65 100644
--- a/krop.spec
+++ b/krop.spec
@@ -5,12 +5,13 @@ Summary:        A tool to crop PDF files with an eye towards eReaders
 License:        GPLv3+
 URL:            http://arminstraub.com/computer/krop
 Source0:        http://arminstraub.com/downloads/%{name}/%{name}-%{version}.tar.gz
+BuildArch:      noarch
 BuildRequires:  desktop-file-utils
-BuildRequires:  python2-devel python-setuptools
+BuildRequires:  python2-devel
+BuildRequires:  python-setuptools
 Requires:       pyPdf
 Requires:       PyQt4
 Requires:       python-poppler-qt4
-BuildArch:      noarch
 
 %description
 krop is a simple graphical tool to crop the pages of PDF files. It is written 
@@ -25,15 +26,15 @@ particularly useful, if your eReader does not support convenient scrolling.
 %setup -q
 
 %build
-%{__python} setup.py build
+%{__python2} setup.py build
 
 %install
-%{__python} setup.py install -O1 --prefix %{_prefix} --skip-build --root %{buildroot}
+%{__python2} setup.py install -O1 --prefix %{_prefix} --skip-build --root %{buildroot}
 desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{name}.desktop
-sed -i '1d' %{buildroot}%{python_sitelib}/%{name}/krop.py
+sed -i '1d' %{buildroot}%{python2_sitelib}/%{name}/krop.py
 
 %check
-%{__python} setup.py check
+%{__python2} setup.py check
 
 %post
 update-desktop-database &> /dev/null || :
@@ -45,8 +46,8 @@ update-desktop-database &> /dev/null || :
 %doc ChangeLog LICENSE README
 %{_bindir}/%{name}
 %{_datadir}/applications/%{name}.desktop
-%{python_sitelib}/%{name}-%{version}-py%{python_version}.egg-info
-%{python_sitelib}/%{name}
+%{python2_sitelib}/%{name}-%{version}-py%{python2_version}.egg-info
+%{python2_sitelib}/%{name}
 
 %changelog
 * Sun Aug 25 2013 Christopher Meng <rpm at cicku.me> - 0.4.4-1


More information about the scm-commits mailing list