diff --git a/python-ndg-httpsclient.changes b/python-ndg-httpsclient.changes index b86b559..e1eaf7e 100644 --- a/python-ndg-httpsclient.changes +++ b/python-ndg-httpsclient.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu May 21 10:56:33 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Sun Jun 2 12:32:13 UTC 2019 - Jan Engelhardt diff --git a/python-ndg-httpsclient.spec b/python-ndg-httpsclient.spec index 6ddcc8c..4edac31 100644 --- a/python-ndg-httpsclient.spec +++ b/python-ndg-httpsclient.spec @@ -1,7 +1,7 @@ # # spec file for package python-ndg-httpsclient # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -30,6 +30,8 @@ BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-pyOpenSSL Requires: python-pyasn1 >= 0.1.1 +Requires(post): update-alternatives +Requires(postun): update-alternatives BuildArch: noarch %python_subpackages @@ -47,14 +49,21 @@ SSL peer. %install %python_install +%python_clone -a %{buildroot}%{_bindir}/ndg_httpclient %python_expand %fdupes %{buildroot}%{$python_sitelib} # tests require internet connection +%post +%python_install_alternative ndg_httpclient + +%postun +%python_uninstall_alternative ndg_httpclient + %files %{python_files} %doc README.md %license ndg/httpsclient/LICENSE %{python_sitelib}/* -%python3_only %{_bindir}/ndg_httpclient +%python_alternative %{_bindir}/ndg_httpclient %changelog