14
0

Accepting request 312143 from home:benoit_monin:branches:devel:languages:python

- update to Unidecode 0.04.18
- 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

OBS-URL: https://build.opensuse.org/request/show/312143
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Unidecode?expand=0&rev=6
This commit is contained in:
2015-06-23 06:31:58 +00:00
committed by Git OBS Bridge
parent 89c140280a
commit 63c947fd25
4 changed files with 37 additions and 6 deletions

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f0f8d53d39877da4849293d548eecb5e79364b573643296869dbc7f5b86709ef
size 201090

3
Unidecode-0.04.18.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f19150c74de2fe6847b13efeeaee402f2bd2c309a446346a8b5baae0315d108a
size 206191

View File

@@ -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 Sat Dec 20 13:02:04 UTC 2014 - benoit.monin@gmx.fr

View File

@@ -1,7 +1,7 @@
# #
# spec file for package python-Unidecode # 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 # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
Name: python-Unidecode Name: python-Unidecode
Version: 0.04.17 Version: 0.04.18
Release: 0 Release: 0
Summary: ASCII transliterations of Unicode text Summary: ASCII transliterations of Unicode text
License: GPL-2.0+ 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 Source: http://pypi.python.org/packages/source/U/Unidecode/Unidecode-%{version}.tar.gz
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: python-devel BuildRequires: python-devel
BuildRequires: python-setuptools
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} && 0%{?suse_version} <= 1110 %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()")} %{!?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} python setup.py install --prefix=%{_prefix} --root=%{buildroot}
%fdupes %buildroot/%_prefix %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 %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 %files
%defattr(-,root,root,-) %defattr(-,root,root,-)
%{python_sitelib}/* %{python_sitelib}/*
%ghost %{_sysconfdir}/alternatives/unidecode
%{_bindir}/unidecode
%{_bindir}/unidecode-%{py_ver}
%changelog %changelog