Accepting request 882032 from home:bnavigator:branches:devel:languages:python

- Update BuildRequirements for testing:
  * only remove coverage options from pytest.ini
  * don't skip tests which had failed 2 years ago
    (gh#cherrypy/cheroot#200) -- except for two subtests still
    failing on some platforms presumably because of OBS specific 
    network setups
  * skip the one test requiring python-jaraco.context in Factory
    staging so that we do not need that package in Ring1.

OBS-URL: https://build.opensuse.org/request/show/882032
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cheroot?expand=0&rev=33
This commit is contained in:
2021-03-31 13:58:04 +00:00
committed by Git OBS Bridge
parent caf21991cc
commit 383448dc97
2 changed files with 44 additions and 19 deletions

View File

@@ -1,3 +1,15 @@
-------------------------------------------------------------------
Mon Mar 29 17:49:02 UTC 2021 - Ben Greiner <code@bnavigator.de>
- Update BuildRequirements for testing:
* only remove coverage options from pytest.ini
* don't skip tests which had failed 2 years ago
(gh#cherrypy/cheroot#200) -- except for two subtests still
failing on some platforms presumably because of OBS specific
network setups
* skip the one test requiring python-jaraco.context in Factory
staging so that we do not need that package in Ring1.
-------------------------------------------------------------------
Fri Mar 19 05:46:04 UTC 2021 - Steve Kowalik <steven.kowalik@suse.com>

View File

@@ -19,6 +19,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define pypi_name cheroot
%bcond_without python2
%bcond_with ringdisabled
Name: python-%{pypi_name}
Version: 8.5.2
Release: 0
@@ -26,25 +27,36 @@ Summary: Pure-python HTTP server
License: BSD-3-Clause
URL: https://github.com/cherrypy/cheroot
Source: https://files.pythonhosted.org/packages/source/c/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
BuildRequires: %{python_module jaraco.context}
BuildRequires: %{python_module jaraco.functools}
BuildRequires: %{python_module jaraco.text >= 3.1}
BuildRequires: %{python_module more-itertools >= 2.6}
BuildRequires: %{python_module setuptools >= 34.4}
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
%if %{with python2}
BuildRequires: python-backports.functools_lru_cache
BuildRequires: python-selectors2
%endif
# SECTION test requirements
%if ! %{with ringdisabled}
# This is not in Ring1 for Staging. See check section
BuildRequires: %{python_module jaraco.context}
%endif
BuildRequires: %{python_module jaraco.text >= 3.1}
BuildRequires: %{python_module portend}
BuildRequires: %{python_module pyOpenSSL}
BuildRequires: %{python_module pytest >= 4.6}
BuildRequires: %{python_module pytest-forked}
BuildRequires: %{python_module pytest-mock >= 1.11.0}
BuildRequires: %{python_module pytest-xdist}
BuildRequires: %{python_module requests-toolbelt}
BuildRequires: %{python_module requests-unixsocket}
BuildRequires: %{python_module requests}
BuildRequires: %{python_module setuptools >= 34.4}
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: %{python_module trustme}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: %{python_module urllib3 >= 1.25}
# /SECTION
Requires: python-jaraco.functools
Requires: python-more-itertools >= 2.6
Requires: python-six >= 1.11.0
@@ -55,14 +67,9 @@ Requires(postun):update-alternatives
# *smacks head against desk*
Provides: python-Cheroot = %{version}
BuildArch: noarch
%if %{with python2}
BuildRequires: python-backports.functools_lru_cache
%endif
%ifpython2
Requires: python-backports.functools_lru_cache
%endif
%ifpython2
Requires: python-backports.functools_lru_cache
Requires: python-selectors2
%endif
%python_subpackages
@@ -71,8 +78,8 @@ Cheroot is the pure-Python HTTP server used by CherryPy.
%prep
%autosetup -n cheroot-%{version} -p1
# do not require cov/xdist/etc
rm pytest.ini
# do not check coverage
sed -i '/--cov/ d' pytest.ini
%build
%python_build
@@ -83,8 +90,13 @@ rm pytest.ini
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
# Exclusions because of gh#cherrypy/cheroot#200
%pytest -k 'not (test_tls_client_auth or test_connection_keepalive)'
%if %{with ringdisabled}
# skip this test file (1 test only) in Factory staging, because we
# do not want to add python-jaraco.context to Ring1
pytest_opts="--ignore cheroot/test/test_wsgi.py"
%endif
# 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)"
%post
%python_install_alternative cheroot
@@ -96,6 +108,7 @@ rm pytest.ini
%license LICENSE.md
%doc README.rst CHANGES.rst
%python_alternative %{_bindir}/cheroot
%{python_sitelib}/*
%{python_sitelib}/cheroot
%{python_sitelib}/cheroot-%{version}*-info
%changelog