summaryrefslogtreecommitdiffstats
path: root/python-cheroot.spec
blob: 5c2defc960c2f84a3a4174a76c59fd9b634d7149 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
%global pkgname cheroot

Name:           python-%{pkgname}
Version:        6.5.4
Release:        2%{?dist}
Summary:        Highly-optimized, pure-python HTTP server
License:        BSD
URL:            https://cheroot.cherrypy.org/

Source0:        https://files.pythonhosted.org/packages/source/c/%{pkgname}/%{pkgname}-%{version}.tar.gz

BuildArch:      noarch
BuildRequires:  python3-devel
BuildRequires:  python3-pytest >= 2.8
BuildRequires:  python3-pytest-mock
BuildRequires:  python3-setuptools_scm
BuildRequires:  python3-setuptools_scm_git_archive
BuildRequires:  python3-ddt
BuildRequires:  python3-pyOpenSSL
BuildRequires:  python3-requests
BuildRequires:  python3-trustme
BuildRequires:  python3-requests-unixsocket

%global __requires_exclude backports\.functools-lru-cache

%global _description\
Cheroot is the high-performance, pure-Python HTTP server used by CherryPy.

%description %_description

%package -n python3-%{pkgname}
Summary:        Highly-optimized, pure-python HTTP server
Requires:       python3

%description -n python3-%{pkgname} %_description

%prep
%setup -q -n %{pkgname}-%{version}

# Drop testmon and coverage dependencies:
sed -i 's/ --testmon//' pytest.ini
sed -i 's/ --cov=cheroot//' pytest.ini
sed -i 's/ --cov-report term-missing:skip-covered//' pytest.ini
sed -i 's/ --cov-report xml//' pytest.ini

%build
SETUPTOOLS_SCM_PRETEND_VERSION=%{version}
%{py3_build}

%install
%{py3_install}

%check
# test_ssl.py currently fails to handle requests.exceptions.SSLError message
# comparisons. Need to debug further and report/fix upstream.
py.test-%{python3_version} || :

%files -n python3-%{pkgname}
%license LICENSE.md
%doc README.rst
%{python3_sitelib}/*
%{_bindir}/cheroot

%changelog
* Mon Feb 25 2019 Ken Dreyer <kdreyer@redhat.com> - 6.5.4-2
- filter backports.functools-lru-cache from Requires

* Mon Feb 25 2019 Ken Dreyer <kdreyer@redhat.com> - 6.5.4-1
- initial package.