diff --git a/python-humanize.spec b/python-humanize.spec index 5ff641a..aa534cb 100644 --- a/python-humanize.spec +++ b/python-humanize.spec @@ -2,8 +2,9 @@ %global with_python3 1 %endif -%if 0%{?rhel} && 0%{?rhel} <= 6 +%if 0%{?el6} %{!?__python2: %global __python2 /usr/bin/python2} +%{!?python2_version: %global python2_version 2.6} %{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} %endif @@ -13,7 +14,7 @@ Name: python-humanize Version: 0.5 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Turns dates in to human readable format, e.g '3 minutes ago' License: MIT @@ -79,7 +80,11 @@ popd %endif %{__python2} setup.py install --skip-build --root %{buildroot} +%if ! 0%{?el6} %find_lang humanize +%else +touch humanize.lang +%endif # Remove python3 lang files %if 0%{?with_python3} @@ -101,8 +106,11 @@ popd %dir %{python2_sitelib}/humanize %{python2_sitelib}/humanize/*.py* %{python2_sitelib}/humanize-%{version}-py%{python2_version}.egg-info +%if ! 0%{?el6} %exclude %{_usr}/lib/python*/site-packages/humanize/locale/*/LC_MESSAGES/*.po - +%else +%{python2_sitelib}/humanize/locale +%endif %if 0%{?with_python3} %files -n python3-humanize -f %{py3dir}/humanize.lang @@ -115,6 +123,9 @@ popd %endif %changelog +* Wed May 14 2014 Steve Traylen 0.5-4 +- lang fixes for .el6 target. + * Wed Apr 23 2014 Steve Traylen 0.5-3 - Use __python2 rather than __python throughout. - rhbz#1088882