forked from pool/python-waitress
Accepting request 923298 from home:schubi2
- Use libalternatives instead of update-alternatives. OBS-URL: https://build.opensuse.org/request/show/923298 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-waitress?expand=0&rev=49
This commit is contained in:
parent
291a34a1f3
commit
471114f33c
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Aug 27 12:27:31 UTC 2021 - Stefan Schubert <schubi@suse.de>
|
||||||
|
|
||||||
|
- Use libalternatives instead of update-alternatives.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Aug 27 11:27:31 UTC 2021 - pgajdos@suse.com
|
Fri Aug 27 11:27:31 UTC 2021 - pgajdos@suse.com
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# spec file
|
# spec file for package python-waitress
|
||||||
#
|
#
|
||||||
# Copyright (c) 2021 SUSE LLC
|
# Copyright (c) 2021 SUSE LLC
|
||||||
#
|
#
|
||||||
@ -16,6 +16,12 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%if 0%{?suse_version} > 1500
|
||||||
|
%bcond_without libalternatives
|
||||||
|
%else
|
||||||
|
%bcond_with libalternatives
|
||||||
|
%endif
|
||||||
|
|
||||||
%global flavor @BUILD_FLAVOR@%{nil}
|
%global flavor @BUILD_FLAVOR@%{nil}
|
||||||
|
|
||||||
%if "%{flavor}" == "doc"
|
%if "%{flavor}" == "doc"
|
||||||
@ -39,13 +45,18 @@ Source: https://files.pythonhosted.org/packages/source/w/waitress/waitre
|
|||||||
Source1: python3.inv
|
Source1: python3.inv
|
||||||
Source2: fetch-intersphinx-inventories.sh
|
Source2: fetch-intersphinx-inventories.sh
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros >= 20210929
|
||||||
%if "%{flavor}" == ""
|
%if "%{flavor}" == ""
|
||||||
BuildRequires: %{python_module pytest-cov}
|
BuildRequires: %{python_module pytest-cov}
|
||||||
BuildRequires: %{python_module pytest}
|
BuildRequires: %{python_module pytest}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
|
%if %{with libalternatives}
|
||||||
|
Requires: alts
|
||||||
|
BuildRequires: alts
|
||||||
|
%else
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(postun):update-alternatives
|
Requires(postun):update-alternatives
|
||||||
|
%endif
|
||||||
%else
|
%else
|
||||||
# Documentation requirements
|
# Documentation requirements
|
||||||
BuildRequires: python3-Sphinx
|
BuildRequires: python3-Sphinx
|
||||||
@ -81,6 +92,10 @@ http://docs.pylonsproject.org/projects/waitress/en/latest/ .
|
|||||||
# disable one test, that requires network
|
# disable one test, that requires network
|
||||||
%pytest -k 'not test_service_port'
|
%pytest -k 'not test_service_port'
|
||||||
|
|
||||||
|
%pre
|
||||||
|
# If libalternatives is used: Removing old update-alternatives entries.
|
||||||
|
%python_libalternatives_reset_alternative waitress-serve
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%python_install_alternative waitress-serve
|
%python_install_alternative waitress-serve
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user