Hello community, here is the log from the commit of package python-Unidecode for openSUSE:Factory checked in at 2017-04-17 10:26:23 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-Unidecode (Old) and /work/SRC/openSUSE:Factory/.python-Unidecode.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "python-Unidecode" Mon Apr 17 10:26:23 2017 rev:4 rq:487434 version:0.04.20 Changes: -------- --- /work/SRC/openSUSE:Factory/python-Unidecode/python-Unidecode.changes 2017-01-12 15:57:29.597449076 +0100 +++ /work/SRC/openSUSE:Factory/.python-Unidecode.new/python-Unidecode.changes 2017-04-17 10:26:24.929328592 +0200 @@ -1,0 +2,5 @@ +Thu Apr 6 16:10:57 UTC 2017 - alarrosa@suse.com + +- Use singlespec macros + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-Unidecode.spec ++++++ --- /var/tmp/diff_new_pack.UD1hFz/_old 2017-04-17 10:26:25.789206818 +0200 +++ /var/tmp/diff_new_pack.UD1hFz/_new 2017-04-17 10:26:25.793206251 +0200 @@ -16,6 +16,7 @@ # +%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-Unidecode Version: 0.04.20 Release: 0 @@ -24,17 +25,15 @@ Group: Development/Languages/Python Url: https://pypi.python.org/pypi/Unidecode Source: https://files.pythonhosted.org/packages/source/U/Unidecode/Unidecode-%{version}.tar.gz +BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools} BuildRequires: fdupes -BuildRequires: python-devel -BuildRequires: python-setuptools +BuildRequires: python-rpm-macros Requires(post): update-alternatives -Requires(postun): update-alternatives +Requires(preun): 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()")} -%else BuildArch: noarch -%endif +%python_subpackages %description It often happens that you have text data in Unicode, but you need to @@ -78,36 +77,28 @@ %setup -q -n Unidecode-%{version} %build -python setup.py build +%python_build %install -python setup.py install --prefix=%{_prefix} --root=%{buildroot} -%fdupes %buildroot/%_prefix +%python_install +%python_expand %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 +%python_clone -a %{buildroot}%{_bindir}/unidecode %check -LANG=en_US.UTF-8 python setup.py test +export LANG=en_US.UTF-8 +%python_exec setup.py test %post -update-alternatives \ - --install %{_bindir}/unidecode unidecode %{_bindir}/unidecode-%{py_ver} 20 +%python_install_alternative unidecode -%postun -if [ $1 -eq 0 ] ; then - update-alternatives --remove unidecode %{_bindir}/unidecode-%{py_ver} -fi +%preun +%python_uninstall_alternative unidecode -%files +%files %python_files %defattr(-,root,root,-) %doc LICENSE ChangeLog %{python_sitelib}/* -%ghost %{_sysconfdir}/alternatives/unidecode -%{_bindir}/unidecode -%{_bindir}/unidecode-%{py_ver} +%python_alternative %{_bindir}/unidecode %changelog