diff --git a/Unidecode-0.04.17.tar.gz b/Unidecode-0.04.17.tar.gz deleted file mode 100644 index 18cd0e2..0000000 --- a/Unidecode-0.04.17.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f0f8d53d39877da4849293d548eecb5e79364b573643296869dbc7f5b86709ef -size 201090 diff --git a/Unidecode-0.04.18.tar.gz b/Unidecode-0.04.18.tar.gz new file mode 100644 index 0000000..ff0a34e --- /dev/null +++ b/Unidecode-0.04.18.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f19150c74de2fe6847b13efeeaee402f2bd2c309a446346a8b5baae0315d108a +size 206191 diff --git a/python-Unidecode.changes b/python-Unidecode.changes index 7048e51..70de392 100644 --- a/python-Unidecode.changes +++ b/python-Unidecode.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Sun Jun 14 08:42:34 UTC 2015 - benoit.monin@gmx.fr + +- update to Unidecode 0.04.18: + * Add a command line utility. (thanks to Andrew Udvare) + * Use setuptools for packaging. +- add new build dependency: python-setuptools +- add and use update-alternatives for unidecode binary +- set a UTF-8 locale to run the tests: they fail without it + ------------------------------------------------------------------- Sat Dec 20 13:02:04 UTC 2014 - benoit.monin@gmx.fr diff --git a/python-Unidecode.spec b/python-Unidecode.spec index 8e4cc24..bd2bc2c 100644 --- a/python-Unidecode.spec +++ b/python-Unidecode.spec @@ -1,7 +1,7 @@ # # spec file for package python-Unidecode # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: python-Unidecode -Version: 0.04.17 +Version: 0.04.18 Release: 0 Summary: ASCII transliterations of Unicode text License: GPL-2.0+ @@ -26,6 +26,9 @@ Url: https://pypi.python.org/pypi/Unidecode Source: http://pypi.python.org/packages/source/U/Unidecode/Unidecode-%{version}.tar.gz BuildRequires: fdupes BuildRequires: python-devel +BuildRequires: python-setuptools +Requires(post): update-alternatives +Requires(postun): update-alternatives BuildRoot: %{_tmppath}/%{name}-%{version}-build %if 0%{?suse_version} && 0%{?suse_version} <= 1110 %{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} @@ -81,11 +84,29 @@ python setup.py build python setup.py install --prefix=%{_prefix} --root=%{buildroot} %fdupes %buildroot/%_prefix +# update-alternatives +mv %{buildroot}%{_bindir}/unidecode %{buildroot}%{_bindir}/unidecode-%{py_ver} +mkdir -p %{buildroot}%{_sysconfdir}/alternatives +touch %{buildroot}%{_sysconfdir}/alternatives/unidecode +ln -sf %{_sysconfdir}/alternatives/unidecode %{buildroot}%{_bindir}/unidecode + %check -python setup.py test +LANG=en_US.UTF-8 python setup.py test + +%post +update-alternatives \ + --install %{_bindir}/unidecode unidecode %{_bindir}/unidecode-%{py_ver} 20 + +%postun +if [ $1 -eq 0 ] ; then + update-alternatives --remove unidecode %{_bindir}/unidecode-%{py_ver} +fi %files %defattr(-,root,root,-) %{python_sitelib}/* +%ghost %{_sysconfdir}/alternatives/unidecode +%{_bindir}/unidecode +%{_bindir}/unidecode-%{py_ver} %changelog