diff --git a/python-chardet.changes b/python-chardet.changes index 7034bef..cb7b1f3 100644 --- a/python-chardet.changes +++ b/python-chardet.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Aug 15 09:57:21 UTC 2017 - dmueller@suse.com + +- add update-alternative support for py2/py3 coinstallability + ------------------------------------------------------------------- Thu Jun 29 08:43:41 UTC 2017 - ecsos@opensuse.org diff --git a/python-chardet.spec b/python-chardet.spec index a429e47..4bed95b 100644 --- a/python-chardet.spec +++ b/python-chardet.spec @@ -73,15 +73,26 @@ or more files:: %install %python_install -%python_expand %fdupes -s %{buildroot}%{$python_sitelib} +%{python_expand %$python_install +mv %{buildroot}%{_bindir}/chardetect %{buildroot}%{_bindir}/chardetect-%{$python_bin_suffix} +%fdupes -s %{buildroot}%{$python_sitelib} +} + +%prepare_alternative chardetect %check %python_exec setup.py test +%post +%python_install_alternative chardetect + +%postun +%python_install_alternative chardetect + %files %{python_files} %defattr(-,root,root,-) %doc README.rst -%python3_only %{_bindir}/chardetect +%python_alternative %{_bindir}/chardetect %{python_sitelib}/chardet %{python_sitelib}/chardet-%{version}-py%{python_version}.egg-info