diff --git a/liblouis.spec b/liblouis.spec index 017c203..ea0d394 100644 --- a/liblouis.spec +++ b/liblouis.spec @@ -1,9 +1,12 @@ +%if !( 0%{?rhel} > 0 && 0%{?rhel} < 7) # Turn off the brp-python-bytecompile script %global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') +%endif + Name: liblouis Version: 2.5.2 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Braille translation and back-translation library Group: System Environment/Libraries @@ -15,9 +18,11 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: help2man BuildRequires: texinfo-tex BuildRequires: python2-devel -%if !0%{?rhel} + +%if !( 0%{?rhel} > 0 && 0%{?rhel} < 7) BuildRequires: python3-devel %endif + Requires(post): info Requires(preun): info @@ -69,7 +74,7 @@ Requires: %{name} = %{version}-%{release} This package provides Python 2 language bindings for %{name}. -%if !0%{?rhel} +%if !( 0%{?rhel} > 0 && 0%{?rhel} < 7) %package python3 Summary: Python 3 language bindings for %{name} Group: Development/Languages @@ -115,9 +120,10 @@ cd python/louis install -d %{buildroot}%{python_sitelib}/louis install -pm 0644 __init__.py %{buildroot}%{python_sitelib}/louis/ + +%if !( 0%{?rhel} > 0 && 0%{?rhel} < 7) %py_byte_compile %{__python} %{buildroot}%{python_sitelib}/louis/ -%if !0%{?rhel} install -d %{buildroot}%{python3_sitelib}/louis install -pm 0644 __init__.py %{buildroot}%{python3_sitelib}/louis/ %py_byte_compile %{__python3} %{buildroot}%{python3_sitelib}/louis/ @@ -166,7 +172,7 @@ fi %doc python/README %{python_sitelib}/louis/ -%if !0%{?rhel} +%if !( 0%{?rhel} > 0 && 0%{?rhel} < 7) %files python3 %defattr(-,root,root,-) %{python3_sitelib}/louis/ @@ -177,8 +183,11 @@ fi %changelog +* Mon Apr 15 2013 Martin Gieseking 2.5.2-5 +- Restrict exclusion of Python 3 packages to RHEL < 7. + * Mon Apr 15 2013 Rui Matos - 2.5.2-4 -- Don't depend on python3 in RHEL +- Don't depend on python3 in RHEL. * Tue Feb 26 2013 Martin Gieseking 2.5.2-3 - Added Python 3 language bindings.