File saltbundlepy-cheroot.spec of Package saltbundlepy-cheroot
#
# spec file for package saltbundlepy-cheroot
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?!saltbundlepy_module:%define saltbundlepy_module() saltbundlepy-%{**}}
%define pythons saltbundlepy
Name: saltbundlepy-cheroot
Version: 6.5.5
Release: 0
Summary: Pure-python HTTP server
License: BSD-3-Clause
Group: Development/Languages/Python
URL: https://github.com/cherrypy/cheroot
Source: https://files.pythonhosted.org/packages/source/c/cheroot/cheroot-%{version}.tar.gz
# PATCH-FIX_UPSTREAM https://github.com/cherrypy/cheroot/pull/282
Patch1: 0001-Avoid-race-condition-on-persistent-HTTP-connections.patch
# PATCH-FIX_UPSTREAM https://github.com/cherrypy/cheroot/commit/621f4ee2c6cda819263be7b26f352abe879b3cd3
Patch2: 0002-Fix-socket.SO_PEERCRED-constant-fallback-PowerPC.patch
Patch3: fix_setup_for_python311.patch
BuildRequires: %{saltbundlepy_module more-itertools >= 2.6}
BuildRequires: %{saltbundlepy_module pyopenssl}
BuildRequires: %{saltbundlepy_module pytest >= 2.8}
BuildRequires: %{saltbundlepy_module pytest-mock}
BuildRequires: %{saltbundlepy_module requests}
BuildRequires: %{saltbundlepy_module setuptools-scm >= 1.15.0}
BuildRequires: %{saltbundlepy_module setuptools-scm-git-archive >= 1.0}
BuildRequires: %{saltbundlepy_module setuptools}
BuildRequires: %{saltbundlepy_module six >= 1.11.0}
BuildRequires: fdupes
BuildRequires: saltbundlepy-rpm-macros
Requires: saltbundlepy-more-itertools >= 2.6
Requires: saltbundlepy-six >= 1.11.0
%python_subpackages
%description
Cheroot is the pure-Python HTTP server used by CherryPy.
%prep
%setup -q -n cheroot-%{version}
%autopatch -p1
# do not require cov/xdist/etc
sed -i -e '/addopts/d' pytest.ini
# drop the dependency of backports.functools_lru_cache from the python3 package
for file in "cheroot.egg-info/requires.txt" "setup.cfg"; do
sed -i "s/backports.functools_lru_cache$/backports.functools_lru_cache ; python_version < '3.3'/" \
"${file}"
done
sed -i "/^python_requires = /d" setup.cfg
%build
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%files %{python_files}
%license LICENSE.md
%doc README.rst CHANGES.rst
%exclude %{_bindir}/cheroot
%{python_sitelib}/*
%changelog