From 5458ad9d6d05560c482dbcd4b42f7975fbdd57c30efcdb274f5b6df7f803b9e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 18 May 2020 08:11:58 +0000 Subject: [PATCH] Accepting request 806790 from home:pgajdos:python submit OBS-URL: https://build.opensuse.org/request/show/806790 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-waitress?expand=0&rev=42 --- python-waitress.changes | 5 +++++ python-waitress.spec | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/python-waitress.changes b/python-waitress.changes index 3f4ac57..28f9994 100644 --- a/python-waitress.changes +++ b/python-waitress.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon May 18 07:25:32 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Thu Feb 6 17:29:20 UTC 2020 - Marketa Calabkova diff --git a/python-waitress.spec b/python-waitress.spec index ba5829e..211e1af 100644 --- a/python-waitress.spec +++ b/python-waitress.spec @@ -32,6 +32,8 @@ Source2: fetch-intersphinx-inventories.sh BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros +Requires(post): update-alternatives +Requires(postun): update-alternatives BuildArch: noarch # SECTION documentation requirements BuildRequires: python3-Sphinx @@ -67,6 +69,7 @@ python3 setup.py build_sphinx && rm build/sphinx/html/.buildinfo %install %python_install +%python_clone -a %{buildroot}%{_bindir}/waitress-serve %python_expand %fdupes %{buildroot}%{$python_sitelib} %check @@ -74,10 +77,16 @@ python3 setup.py build_sphinx && rm build/sphinx/html/.buildinfo rm waitress/tests/test_adjustments.py %python_exec setup.py test +%post +%python_install_alternative waitress-serve + +%postun +%python_uninstall_alternative waitress-serve + %files %{python_files} %license LICENSE.txt %doc COPYRIGHT.txt README.rst -%python3_only %{_bindir}/waitress-serve +%python_alternative %{_bindir}/waitress-serve %{python_sitelib}/* %files %{python_files doc}