Hello community, here is the log from the commit of package python3-tables for openSUSE:Factory checked in at 2016-02-05 00:31:31 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python3-tables (Old) and /work/SRC/openSUSE:Factory/.python3-tables.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python3-tables" Changes: -------- --- /work/SRC/openSUSE:Factory/python3-tables/python3-tables.changes 2015-09-27 08:40:01.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.python3-tables.new/python3-tables.changes 2016-02-05 00:31:33.000000000 +0100 @@ -1,0 +2,5 @@ +Mon Feb 1 11:50:21 UTC 2016 - [email protected] + +- Implement update-alternatives + +------------------------------------------------------------------- @@ -13 +17,0 @@ - ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python3-tables.spec ++++++ --- /var/tmp/diff_new_pack.1AkX1K/_old 2016-02-05 00:31:34.000000000 +0100 +++ /var/tmp/diff_new_pack.1AkX1K/_new 2016-02-05 00:31:34.000000000 +0100 @@ -26,7 +26,7 @@ Source0: https://pypi.python.org/packages/source/t/tables/tables-%{version}.tar.gz BuildRequires: fdupes BuildRequires: gcc-c++ -BuildRequires: hdf5-devel >= 1.8.9 +BuildRequires: hdf5-devel >= 1.8.10 BuildRequires: libbz2-devel BuildRequires: lzo-devel BuildRequires: python3-2to3 @@ -36,12 +36,14 @@ BuildRequires: python3-numexpr >= 2.4 BuildRequires: python3-numpy-devel >= 1.7.1 BuildRequires: python3-setuptools -Requires: hdf5 >= 1.8.9 +Requires: hdf5 >= 1.8.10 Requires: python3-blosc Requires: python3-numexpr >= 2.4 Requires: python3-numpy >= 1.7.1 Recommends: bzip2 Recommends: lzo +Requires(post): update-alternatives +Requires(postun): update-alternatives BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -69,18 +71,43 @@ %install python3 setup.py install --prefix=%{_prefix} --root=%{buildroot} %fdupes -s %{buildroot}%{python3_sitearch} -mv %{buildroot}%{_bindir}/ptdump %{buildroot}%{_bindir}/ptdump-%{py3_ver} -mv %{buildroot}%{_bindir}/ptrepack %{buildroot}%{_bindir}/ptrepack-%{py3_ver} -mv %{buildroot}%{_bindir}/pt2to3 %{buildroot}%{_bindir}/pt2to3-%{py3_ver} -mv %{buildroot}%{_bindir}/pttree %{buildroot}%{_bindir}/pttree-%{py3_ver} + +# Prepare for update-alternatives usage +mkdir -p %{buildroot}%{_sysconfdir}/alternatives +for p in pt2to3 ptdump ptrepack pttree ; do + mv %{buildroot}%{_bindir}/$p %{buildroot}%{_bindir}/$p-%{py3_ver} + ln -s -f %{_sysconfdir}/alternatives/$p %{buildroot}%{_bindir}/$p + # create a dummy target for /etc/alternatives/$p + touch %{buildroot}%{_sysconfdir}/alternatives/$p +done + +%post +"%_sbindir/update-alternatives" \ + --install %{_bindir}/pt2to3 pt2to3 %{_bindir}/pt2to3-%{py3_ver} 30 \ + --slave %{_bindir}/ptdump ptdump %{_bindir}/ptdump-%{py3_ver} \ + --slave %{_bindir}/ptrepack ptrepack %{_bindir}/ptrepack-%{py3_ver} \ + --slave %{_bindir}/pttree pttree %{_bindir}/pttree-%{py3_ver} + +%postun +if [ $1 -eq 0 ] ; then + "%_sbindir/update-alternatives" --remove pt2to3 %{_bindir}/pt2to3-%{py3_ver} +fi %files %defattr(-,root,root) %doc ANNOUNCE.txt LICENSE.txt README.rst RELEASE_NOTES.txt THANKS +%{_bindir}/pt2to3 +%{_bindir}/ptdump +%{_bindir}/ptrepack +%{_bindir}/pttree +%{_bindir}/pt2to3-%{py3_ver} %{_bindir}/ptdump-%{py3_ver} %{_bindir}/ptrepack-%{py3_ver} -%{_bindir}/pt2to3-%{py3_ver} %{_bindir}/pttree-%{py3_ver} +%ghost %{_sysconfdir}/alternatives/pt2to3 +%ghost %{_sysconfdir}/alternatives/ptdump +%ghost %{_sysconfdir}/alternatives/ptrepack +%ghost %{_sysconfdir}/alternatives/pttree %{python3_sitearch}/tables/ %{python3_sitearch}/tables-%{version}-py%{py3_ver}.egg-info
