Hello community,

here is the log from the commit of package python-argcomplete for 
openSUSE:Factory checked in at 2020-06-10 00:43:23
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-argcomplete (Old)
 and      /work/SRC/openSUSE:Factory/.python-argcomplete.new.3606 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-argcomplete"

Wed Jun 10 00:43:23 2020 rev:16 rq:809816 version:1.11.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-argcomplete/python-argcomplete.changes    
2020-05-02 22:17:05.744505671 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-argcomplete.new.3606/python-argcomplete.changes
  2020-06-10 00:43:29.086195153 +0200
@@ -1,0 +2,5 @@
+Wed May 27 13:01:18 UTC 2020 - Petr Gajdos <[email protected]>
+
+- %python3_only -> %python_alternative
+
+-------------------------------------------------------------------

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

Other differences:
------------------
++++++ python-argcomplete.spec ++++++
--- /var/tmp/diff_new_pack.vpBGIz/_old  2020-06-10 00:43:30.690199158 +0200
+++ /var/tmp/diff_new_pack.vpBGIz/_new  2020-06-10 00:43:30.694199168 +0200
@@ -37,6 +37,8 @@
 BuildRequires:  fish
 BuildRequires:  python-rpm-macros
 Requires:       python-importlib-metadata >= 0.23
+Requires(post): update-alternatives
+Requires(postun): update-alternatives
 BuildArch:      noarch
 %python_subpackages
 
@@ -57,32 +59,45 @@
 %prep
 %setup -q -n argcomplete-%{version}
 %autopatch -p1
-# https://github.com/kislyuk/argcomplete/issues/255
-# https://github.com/kislyuk/argcomplete/issues/256
-sed -i -e "1s|#!.*python.*|#!%{__python3}|" test/prog scripts/*
-sed -i -e "s|python |python3 |g" test/test.py
 
 %build
 %python_build
 
 %install
 %python_install
+%python_clone -a %{buildroot}%{_bindir}/register-python-argcomplete
+%python_clone -a 
%{buildroot}%{_bindir}/python-argcomplete-check-easy-install-script
 rm -rf %{buildroot}%{python_sitelib}/test
 rm %{buildroot}%{_bindir}/activate-global-python-argcomplete
-%python_expand %fdupes %{buildroot}%{$python_sitelib}
 # tcsh support is broken
 rm %{buildroot}%{_bindir}/python-argcomplete-tcsh
+%python_expand %fdupes %{buildroot}%{$python_sitelib}
 
 %check
 export LANG=en_US.UTF-8
-%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} $python -m unittest 
discover -v
+%{python_expand \
+  # https://github.com/kislyuk/argcomplete/issues/255
+  # https://github.com/kislyuk/argcomplete/issues/256
+  # https://github.com/kislyuk/argcomplete/issues/299
+  sed -i -e "1s|#!.*python.*|#!%{_bindir}/$python|" test/prog scripts/*
+  sed -i -e "s|python |$python |g" test/test.py
+  PYTHONPATH=%{buildroot}%{$python_sitelib} $python -m unittest discover -v
+}
+
+%post
+%python_install_alternative register-python-argcomplete
+%python_install_alternative python-argcomplete-check-easy-install-script
+
+%postun
+%python_uninstall_alternative register-python-argcomplete
+%python_uninstall_alternative python-argcomplete-check-easy-install-script
 
 %files %{python_files}
 %doc README.rst
 %license LICENSE.rst
 %{python_sitelib}/argcomplete-%{version}-py%{python_version}.egg-info
 %{python_sitelib}/argcomplete
-%python3_only %{_bindir}/python-argcomplete-check-easy-install-script
-%python3_only %{_bindir}/register-python-argcomplete
+%python_alternative %{_bindir}/python-argcomplete-check-easy-install-script
+%python_alternative %{_bindir}/register-python-argcomplete
 
 %changelog


Reply via email to