15
0

Accepting request 923368 from devel:languages:python

OBS-URL: https://build.opensuse.org/request/show/923368
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-cheroot?expand=0&rev=16
This commit is contained in:
2021-10-25 13:16:50 +00:00
committed by Git OBS Bridge
2 changed files with 26 additions and 1 deletions

View File

@@ -1,3 +1,13 @@
-------------------------------------------------------------------
Tue Oct 5 13:46:46 UTC 2021 - Stefan Schubert <schubi@suse.de>
- Added BuildRequires: alts
-------------------------------------------------------------------
Thu Sep 30 08:50:54 UTC 2021 - Stefan Schubert <schubi@suse.de>
- Use libalternatives instead of update-alternatives.
-------------------------------------------------------------------
Mon Mar 29 17:49:02 UTC 2021 - Ben Greiner <code@bnavigator.de>

View File

@@ -16,6 +16,12 @@
#
%if 0%{?suse_version} > 1500
%bcond_without libalternatives
%else
%bcond_with libalternatives
%endif
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define pypi_name cheroot
%bcond_without python2
@@ -34,7 +40,7 @@ BuildRequires: %{python_module setuptools_scm >= 1.15.0}
BuildRequires: %{python_module setuptools_scm_git_archive >= 1.0}
BuildRequires: %{python_module six >= 1.11.0}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: python-rpm-macros >= 20210929
%if %{with python2}
BuildRequires: python-backports.functools_lru_cache
BuildRequires: python-selectors2
@@ -60,8 +66,13 @@ BuildRequires: %{python_module urllib3 >= 1.25}
Requires: python-jaraco.functools
Requires: python-more-itertools >= 2.6
Requires: python-six >= 1.11.0
%if %{with libalternatives}
Requires: alts
BuildRequires: alts
%else
Requires(post): update-alternatives
Requires(postun):update-alternatives
%endif
# the package and distribution name is lowercase-cheroot,
# but PyPI claims the name is capital-Cheroot
# *smacks head against desk*
@@ -98,6 +109,10 @@ pytest_opts="--ignore cheroot/test/test_wsgi.py"
# test_tls_client_auth[...-False-localhost-builtin] fails ocassionally on server-side OBS
%pytest $pytest_opts -k "not (test_tls_client_auth and False-localhost-builtin)"
%pre
# If libalternatives is used: Removing old update-alternatives entries.
%python_libalternatives_reset_alternative cheroot
%post
%python_install_alternative cheroot