From fa947f52545b477508b14652a71b927b6e3f3cbcc6a582d40621e9ccc63a6329 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Thu, 28 May 2020 07:35:03 +0000 Subject: [PATCH] Accepting request 809579 from home:pgajdos:python submit OBS-URL: https://build.opensuse.org/request/show/809579 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-certstream?expand=0&rev=14 --- python-certstream.changes | 5 +++++ python-certstream.spec | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/python-certstream.changes b/python-certstream.changes index fddb804..5e6ee03 100644 --- a/python-certstream.changes +++ b/python-certstream.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed May 27 09:36:43 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Wed Jan 1 11:09:59 UTC 2020 - Sebastian Wagner diff --git a/python-certstream.spec b/python-certstream.spec index a2f8ea0..c074163 100644 --- a/python-certstream.spec +++ b/python-certstream.spec @@ -30,6 +30,8 @@ BuildRequires: %{python_module termcolor} BuildRequires: %{python_module websocket-client >= 0.48.0} BuildRequires: fdupes BuildRequires: python-rpm-macros +Requires(post): update-alternatives +Requires(postun): update-alternatives # /SECTION Requires: python3-termcolor Requires: python3-websocket-client >= 0.48.0 @@ -52,15 +54,22 @@ sed -i -e 's:==:>=:g' requirements.txt %install %python_install +%python_clone -a %{buildroot}%{_bindir}/certstream %python_expand %fdupes %{buildroot}%{$python_sitelib} # there are no tests +%post +%python_install_alternative certstream + +%postun +%python_uninstall_alternative certstream + %files %{python_files} %doc README.md %license LICENSE %{python_sitelib}/certstream/ %{python_sitelib}/certstream-%{version}-py*.egg-info -%python3_only %{_bindir}/certstream +%python_alternative %{_bindir}/certstream %changelog