2017-09-01 16:36:11 +02:00
|
|
|
#
|
|
|
|
# spec file for package python-aiohttp
|
|
|
|
#
|
2021-02-28 17:06:44 +01:00
|
|
|
# Copyright (c) 2021 SUSE LLC
|
2017-09-01 16:36:11 +02:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2018-10-06 11:20:40 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2017-09-11 17:42:42 +02:00
|
|
|
#
|
2017-09-01 16:36:11 +02:00
|
|
|
|
|
|
|
|
2017-09-22 15:51:34 +02:00
|
|
|
%{?!python_module:%define python_module() python3-%{**}}
|
2017-09-08 19:35:05 +02:00
|
|
|
%define skip_python2 1
|
2017-09-01 16:36:11 +02:00
|
|
|
Name: python-aiohttp
|
2021-02-28 17:06:44 +01:00
|
|
|
Version: 3.7.4
|
2017-09-01 16:36:11 +02:00
|
|
|
Release: 0
|
2017-09-11 17:42:42 +02:00
|
|
|
Summary: Asynchronous HTTP client/server framework
|
2017-09-01 16:36:11 +02:00
|
|
|
License: Apache-2.0
|
2018-08-31 13:50:47 +02:00
|
|
|
URL: https://github.com/aio-libs/aiohttp
|
2017-09-01 16:36:11 +02:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/a/aiohttp/aiohttp-%{version}.tar.gz
|
2020-03-10 09:31:56 +01:00
|
|
|
Patch0: unbundle-http-parser.patch
|
2019-01-15 17:33:00 +01:00
|
|
|
BuildRequires: %{python_module Cython}
|
2019-06-04 17:42:37 +02:00
|
|
|
BuildRequires: %{python_module async_timeout >= 3.0}
|
|
|
|
BuildRequires: %{python_module attrs >= 17.3.0}
|
|
|
|
BuildRequires: %{python_module chardet >= 2.0}
|
2018-08-31 13:50:47 +02:00
|
|
|
BuildRequires: %{python_module devel >= 3.5.3}
|
2020-10-29 11:37:40 +01:00
|
|
|
BuildRequires: %{python_module freezegun}
|
2020-12-04 16:14:54 +01:00
|
|
|
BuildRequires: %{python_module idna_ssl >= 1.0}
|
2019-09-18 10:19:42 +02:00
|
|
|
BuildRequires: %{python_module multidict >= 4.5}
|
2017-09-01 16:36:11 +02:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2020-12-04 16:14:54 +01:00
|
|
|
BuildRequires: %{python_module typing_extensions >= 3.6.5}
|
|
|
|
BuildRequires: %{python_module yarl >= 1.0}
|
2018-04-14 08:45:33 +02:00
|
|
|
BuildRequires: fdupes
|
2020-03-10 09:31:56 +01:00
|
|
|
BuildRequires: http-parser-devel
|
2017-09-11 17:42:42 +02:00
|
|
|
BuildRequires: python-rpm-macros
|
2020-12-04 16:14:54 +01:00
|
|
|
Requires: python >= 3.6
|
2018-08-31 13:50:47 +02:00
|
|
|
Requires: python-async_timeout >= 3.0
|
|
|
|
Requires: python-attrs >= 17.3.0
|
|
|
|
Requires: python-chardet >= 2.0
|
|
|
|
Requires: python-gunicorn
|
2019-09-18 10:19:42 +02:00
|
|
|
Requires: python-multidict >= 4.5
|
2020-10-29 11:37:40 +01:00
|
|
|
Requires: python-typing_extensions >= 3.6.5
|
2019-06-04 17:02:58 +02:00
|
|
|
Requires: python-yarl >= 1.0
|
2018-04-14 08:45:33 +02:00
|
|
|
Recommends: python-aiodns
|
2020-12-04 16:14:54 +01:00
|
|
|
Recommends: python-brotlipy
|
2018-04-14 08:45:33 +02:00
|
|
|
Recommends: python-cChardet
|
|
|
|
Suggests: %{name}-doc
|
2020-12-04 16:14:54 +01:00
|
|
|
%if 0%{?suse_version} < 1550 || "%{python_flavor}" == "python36"
|
|
|
|
Requires: python-idna_ssl >= 1.0
|
2019-08-22 11:30:25 +02:00
|
|
|
%endif
|
2017-09-08 19:35:05 +02:00
|
|
|
# SECTION test requirements
|
2020-10-29 11:37:40 +01:00
|
|
|
BuildRequires: %{python_module aiodns}
|
2018-03-23 17:04:53 +01:00
|
|
|
BuildRequires: %{python_module async_generator}
|
2018-08-31 12:50:36 +02:00
|
|
|
BuildRequires: %{python_module brotlipy}
|
2017-09-01 16:36:11 +02:00
|
|
|
BuildRequires: %{python_module gunicorn}
|
2017-12-06 10:27:11 +01:00
|
|
|
BuildRequires: %{python_module pluggy}
|
2020-10-29 11:37:40 +01:00
|
|
|
BuildRequires: %{python_module pytest-asyncio}
|
2017-09-11 17:42:42 +02:00
|
|
|
BuildRequires: %{python_module pytest-mock}
|
2017-09-08 19:35:05 +02:00
|
|
|
BuildRequires: %{python_module pytest-timeout}
|
2017-09-01 16:36:11 +02:00
|
|
|
BuildRequires: %{python_module pytest}
|
2020-10-29 11:37:40 +01:00
|
|
|
BuildRequires: %{python_module re-assert}
|
2019-02-27 15:32:14 +01:00
|
|
|
BuildRequires: %{python_module trustme}
|
2020-12-04 16:14:54 +01:00
|
|
|
|
2017-09-08 19:35:05 +02:00
|
|
|
# /SECTION
|
|
|
|
# SECTION docs
|
2017-12-10 15:58:23 +01:00
|
|
|
BuildRequires: %{python_module MarkupSafe}
|
2018-02-17 20:07:09 +01:00
|
|
|
BuildRequires: python3-Pygments >= 2.1
|
2017-09-08 19:35:05 +02:00
|
|
|
BuildRequires: python3-Sphinx
|
2018-02-17 20:07:09 +01:00
|
|
|
BuildRequires: python3-aiohttp-theme
|
2017-09-08 19:35:05 +02:00
|
|
|
BuildRequires: python3-sphinxcontrib-asyncio
|
2018-03-23 17:04:53 +01:00
|
|
|
BuildRequires: python3-sphinxcontrib-blockdiag
|
2017-09-08 19:35:05 +02:00
|
|
|
BuildRequires: python3-sphinxcontrib-newsfeed
|
|
|
|
# /SECTION
|
2017-09-01 16:36:11 +02:00
|
|
|
%python_subpackages
|
|
|
|
|
2017-09-08 19:35:05 +02:00
|
|
|
%package -n %{name}-doc
|
2018-04-14 08:45:33 +02:00
|
|
|
Summary: Documentation files for %{name}
|
2017-09-08 19:35:05 +02:00
|
|
|
|
2017-09-01 16:36:11 +02:00
|
|
|
%description
|
2017-09-11 17:42:42 +02:00
|
|
|
Asynchronous HTTP client/server framework for Python.
|
2017-09-08 19:35:05 +02:00
|
|
|
|
2017-09-11 17:42:42 +02:00
|
|
|
- Supports both the client and server side of HTTP protocol.
|
|
|
|
- Supports both client and server WebSockets out-of-the-box.
|
|
|
|
- Web-server has middleware and pluggable routing.
|
2017-09-08 19:35:05 +02:00
|
|
|
|
|
|
|
%description -n %{name}-doc
|
2018-04-14 08:45:33 +02:00
|
|
|
HTML documentation on the API and examples for %{name}.
|
2017-09-01 16:36:11 +02:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n aiohttp-%{version}
|
2020-03-10 09:31:56 +01:00
|
|
|
%patch0 -p1
|
2020-10-29 11:37:40 +01:00
|
|
|
# Prevent building with vendor version
|
|
|
|
rm vendor/http-parser/*.c
|
2017-09-01 16:36:11 +02:00
|
|
|
|
2020-12-20 16:42:25 +01:00
|
|
|
# Allow use with chardet v4
|
|
|
|
# https://github.com/aio-libs/aiohttp/pull/5333
|
|
|
|
sed -i 's/chardet>=2.0,<4.0/chardet>=2.0/' setup.py
|
|
|
|
|
2017-09-01 16:36:11 +02:00
|
|
|
%build
|
|
|
|
export CFLAGS="%{optflags}"
|
|
|
|
%python_build
|
2017-09-08 19:35:05 +02:00
|
|
|
pushd docs
|
2020-03-10 09:36:10 +01:00
|
|
|
%make_build html
|
2017-09-08 19:35:05 +02:00
|
|
|
rm _build/html/.buildinfo
|
|
|
|
popd
|
2017-09-01 16:36:11 +02:00
|
|
|
|
|
|
|
%install
|
|
|
|
%python_install
|
2017-09-08 19:35:05 +02:00
|
|
|
%{python_expand %fdupes %{buildroot}%{$python_sitearch}
|
2020-12-04 16:14:54 +01:00
|
|
|
find %{buildroot}%{$python_sitearch} -name '*.[ch]' -delete
|
|
|
|
rm -r %{buildroot}%{$python_sitearch}/aiohttp/.hash
|
2017-09-08 19:35:05 +02:00
|
|
|
}
|
2017-09-01 16:36:11 +02:00
|
|
|
|
|
|
|
%check
|
2020-12-04 16:14:54 +01:00
|
|
|
# ignore setup.cfg
|
|
|
|
touch pytest.ini
|
|
|
|
%define skiptest_allflavors test_aiohttp_request_coroutine or test_mark_formdata_as_processed or test_aiohttp_plugin_async
|
|
|
|
# we need it to be defined for all flavors for expansion inside pytest_arch to work. %%{?...} would expand too early.
|
|
|
|
%{lua: for p in string.gmatch(rpm.expand("%pythons"), "%S+") do rpm.define("skiptest_" .. p .. "_only %{nil}") end}
|
|
|
|
%if 0%{?python3_version_nodots} == 36
|
|
|
|
%define skiptest_python3_only or test_read_boundary_with_incomplete_chunk
|
|
|
|
%endif
|
|
|
|
%define skiptest_python36_only or test_read_boundary_with_incomplete_chunk
|
|
|
|
%pytest_arch --ignore ./aiohttp -rs -k 'not (%{skiptest_allflavors} %{skiptest_$python_only})'
|
2017-09-01 16:36:11 +02:00
|
|
|
|
|
|
|
%files %{python_files}
|
2018-04-14 08:45:33 +02:00
|
|
|
%license LICENSE.txt
|
2020-03-10 09:36:10 +01:00
|
|
|
%doc CHANGES.rst CONTRIBUTORS.txt README.rst
|
2020-12-04 16:14:54 +01:00
|
|
|
%{python_sitearch}/aiohttp
|
|
|
|
%{python_sitearch}/aiohttp-%{version}*-info
|
2017-09-01 16:36:11 +02:00
|
|
|
|
2017-09-08 19:35:05 +02:00
|
|
|
%files -n %{name}-doc
|
|
|
|
%doc docs/_build/html
|
|
|
|
|
2017-09-01 16:36:11 +02:00
|
|
|
%changelog
|