Hello community,

here is the log from the commit of package python-stdeb for openSUSE:Factory 
checked in at 2020-05-20 18:44:15
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-stdeb (Old)
 and      /work/SRC/openSUSE:Factory/.python-stdeb.new.2738 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-stdeb"

Wed May 20 18:44:15 2020 rev:6 rq:807155 version:0.9.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-stdeb/python-stdeb.changes        
2020-03-26 23:35:26.538822013 +0100
+++ /work/SRC/openSUSE:Factory/.python-stdeb.new.2738/python-stdeb.changes      
2020-05-20 18:45:07.741237405 +0200
@@ -1,0 +2,5 @@
+Tue May 19 08:03:03 UTC 2020 - Petr Gajdos <pgaj...@suse.com>
+
+- %python3_only -> %python_alternative
+
+-------------------------------------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-stdeb.spec ++++++
--- /var/tmp/diff_new_pack.FJ9nFk/_old  2020-05-20 18:45:09.625241637 +0200
+++ /var/tmp/diff_new_pack.FJ9nFk/_new  2020-05-20 18:45:09.625241637 +0200
@@ -23,7 +23,7 @@
 Summary:        Python to Debian source package conversion utility
 License:        MIT
 Group:          Development/Languages/Python
-URL:            http://github.com/astraw/stdeb
+URL:            https://github.com/astraw/stdeb
 Source:         
https://files.pythonhosted.org/packages/source/s/stdeb/stdeb-%{version}.tar.gz
 # Test data
 Source1:        tablib-0.13.0.tar.gz
@@ -56,6 +56,8 @@
 Requires:       dpkg
 Requires:       fakeroot
 Requires:       python-requests
+Requires(post): update-alternatives
+Requires(postun): update-alternatives
 BuildArch:      noarch
 %python_subpackages
 
@@ -82,22 +84,40 @@
 
 %install
 %python_install
+%python_clone -a %{buildroot}%{_bindir}/pypi-install
+%python_clone -a %{buildroot}%{_bindir}/pypi-download
+%python_clone -a %{buildroot}%{_bindir}/py2dsc-deb
+%python_clone -a %{buildroot}%{_bindir}/py2dsc
 %python_expand %fdupes %{buildroot}%{$python_sitelib}
 
 %check
 # There is also test2and3.sh which could be inlined here 
-export PATH=/sbin:/usr/sbin:%{buildroot}/%{_bindir}:$PATH
+export PATH=/sbin:%{_prefix}/sbin:%{buildroot}/%{_bindir}:$PATH
 %{python_expand export PYTHONPATH=%{buildroot}%{$python_sitelib}
+# update-alternatives: use available versioned binaries
+sed -i 's:\(_LOC=`which\s\+[-a-zA-Z0-9]\+\):\1-%{python_version}:' test.sh
 PYEXE=$python bash -x ./test.sh
 }
 
+%post
+%python_install_alternative pypi-install
+%python_install_alternative pypi-download
+%python_install_alternative py2dsc-deb
+%python_install_alternative py2dsc
+
+%postun
+%python_uninstall_alternative pypi-install
+%python_uninstall_alternative pypi-download
+%python_uninstall_alternative py2dsc-deb
+%python_uninstall_alternative py2dsc
+
 %files %{python_files}
 %license LICENSE.txt
 %doc CHANGELOG.txt README.rst
-%python3_only %{_bindir}/py2dsc
-%python3_only %{_bindir}/py2dsc-deb
-%python3_only %{_bindir}/pypi-download
-%python3_only %{_bindir}/pypi-install
+%python_alternative %{_bindir}/py2dsc
+%python_alternative %{_bindir}/py2dsc-deb
+%python_alternative %{_bindir}/pypi-download
+%python_alternative %{_bindir}/pypi-install
 %{python_sitelib}/*
 
 %changelog


Reply via email to