[python-unidecode/f21] Fixed spec to conditionally build python3 package

pjp pjp at fedoraproject.org
Sun Sep 7 06:24:36 UTC 2014


commit 582450faa1b3acd610e49da264e8097581ea267e
Author: P J P <pjp at fedoraproject.org>
Date:   Sun Sep 7 11:54:13 2014 +0530

    Fixed spec to conditionally build python3 package

 python-unidecode.spec |   19 +++++++++++++++----
 1 files changed, 15 insertions(+), 4 deletions(-)
---
diff --git a/python-unidecode.spec b/python-unidecode.spec
index 68c14ca..cdace96 100644
--- a/python-unidecode.spec
+++ b/python-unidecode.spec
@@ -2,7 +2,7 @@
 
 Name:		python-unidecode
 Version:	0.04.16
-Release:	1%{?dist}
+Release:	2%{?dist}
 Summary:	US-ASCII transliterations of Unicode text
 
 Group:		Development/Libraries
@@ -12,8 +12,9 @@ Source0:	http://pypi.python.org/packages/source/U/%{srcname}/%{srcname}-%{versio
 
 BuildArch:	noarch
 BuildRequires:	python2-devel
-
+%if 0%{?fedora} || 0%{?rhel} > 7
 BuildRequires: python3-devel
+%endif
 
 
 %description
@@ -21,6 +22,7 @@ This is a python port of Text::Unidecode Perl module. It provides a function,
 'unidecode(...)' that takes Unicode data and tries to represent it in ASCII
 characters.
 
+%if 0%{?fedora} || 0%{?rhel} > 7
 %package -n python3-unidecode
 Summary:	US-ASCII transliterations of Unicode text
 
@@ -28,6 +30,7 @@ Summary:	US-ASCII transliterations of Unicode text
 This is a python port of Text::Unidecode Perl module. It provides a function,
 'unidecode(...)' that takes Unicode data and tries to represent it in ASCII
 characters.
+%endif
 
 
 %prep
@@ -36,32 +39,40 @@ characters.
 %build
 %{__python} setup.py build
 
+%if 0%{?fedora} || 0%{?rhel} > 7
 rm -rf %{py3dir}
 cp -a . %{py3dir}
 pushd %{py3dir}
 %{__python3} setup.py build
 popd
+%endif
 
 %install
 %{__python} setup.py install --skip-build --root=%{buildroot}
 
+%if 0%{?fedora} || 0%{?rhel} > 7
 pushd %{py3dir}
 %{__python3} setup.py install --skip-build --root %{buildroot}
 popd
-
+%endif
 
 %files
 %doc README ChangeLog
 %{python_sitelib}/unidecode/
 %{python_sitelib}/*.egg-info
 
-
+%if 0%{?fedora} || 0%{?rhel} > 7
 %files -n python3-unidecode
 %doc README ChangeLog
 %{python3_sitelib}/unidecode/
 %{python3_sitelib}/*.egg-info
+%endif
+
 
 %changelog
+* Sun Sep 07 2014 P J P <pjp at fedoraproject.org> - 0.04.16-2
+- Fixed python3-unidecode build to make it conditional on epel.
+
 * Tue Sep 02 2014 P J P <pjp at fedoraproject.org> - 0.04.16-1
 - New release
 


More information about the scm-commits mailing list