2017-09-01 14:36:11 +00:00
|
|
|
|
#
|
|
|
|
|
# spec file for package python-aiohttp
|
|
|
|
|
#
|
2023-03-16 07:32:31 +00:00
|
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2017-09-01 14:36:11 +00: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 09:20:40 +00:00
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2017-09-11 15:42:42 +00:00
|
|
|
|
#
|
2017-09-01 14:36:11 +00:00
|
|
|
|
|
|
|
|
|
|
2021-12-13 18:46:07 +00:00
|
|
|
|
%bcond_with docs
|
2023-04-21 14:59:53 +00:00
|
|
|
|
%{?sle15_python_module_pythons}
|
2017-09-01 14:36:11 +00:00
|
|
|
|
Name: python-aiohttp
|
2023-11-27 15:25:40 +00:00
|
|
|
|
Version: 3.9.1
|
2017-09-01 14:36:11 +00:00
|
|
|
|
Release: 0
|
2017-09-11 15:42:42 +00:00
|
|
|
|
Summary: Asynchronous HTTP client/server framework
|
2017-09-01 14:36:11 +00:00
|
|
|
|
License: Apache-2.0
|
2018-08-31 11:50:47 +00:00
|
|
|
|
URL: https://github.com/aio-libs/aiohttp
|
2017-09-01 14:36:11 +00:00
|
|
|
|
Source: https://files.pythonhosted.org/packages/source/a/aiohttp/aiohttp-%{version}.tar.gz
|
2023-10-14 17:33:08 +00:00
|
|
|
|
# PATCH-FIX-OPENSUSE remove-re-assert.patch mcepl@suse.com
|
|
|
|
|
# We really don’t need beautifuly presented exceptions for our testing
|
|
|
|
|
Patch1: remove-re-assert.patch
|
2023-08-20 17:30:39 +00:00
|
|
|
|
Requires: python-aiosignal >= 1.1.2
|
|
|
|
|
Requires: python-attrs >= 17.3.0
|
|
|
|
|
Requires: python-frozenlist >= 1.1.1
|
2023-11-26 01:07:55 +00:00
|
|
|
|
# %if %python_version_nodots < 311
|
2023-08-20 17:30:39 +00:00
|
|
|
|
Requires: (python-async_timeout >= 4.0 with python-async_timeout < 5)
|
2023-11-26 01:07:55 +00:00
|
|
|
|
# %endif
|
2023-08-20 17:30:39 +00:00
|
|
|
|
Requires: (python-charset-normalizer >= 2.0 with python-charset-normalizer < 4)
|
|
|
|
|
Requires: (python-multidict >= 4.5 with python-multidict < 7)
|
|
|
|
|
Requires: (python-yarl >= 1.0 with python-yarl < 2)
|
2023-09-11 20:43:13 +00:00
|
|
|
|
Recommends: python-Brotli
|
2023-08-20 17:30:39 +00:00
|
|
|
|
Recommends: python-aiodns
|
|
|
|
|
Recommends: python-cChardet
|
|
|
|
|
Suggests: %{name}-doc
|
2022-11-08 07:22:30 +00:00
|
|
|
|
# SECTION build requirements
|
2019-01-15 16:33:00 +00:00
|
|
|
|
BuildRequires: %{python_module Cython}
|
2023-11-26 01:07:55 +00:00
|
|
|
|
BuildRequires: %{python_module devel >= 3.9}
|
2022-11-08 07:22:30 +00:00
|
|
|
|
BuildRequires: %{python_module pip}
|
|
|
|
|
BuildRequires: %{python_module setuptools}
|
|
|
|
|
BuildRequires: %{python_module wheel}
|
|
|
|
|
BuildRequires: fdupes
|
|
|
|
|
BuildRequires: python-rpm-macros
|
|
|
|
|
# /SECTION
|
|
|
|
|
# SECTION install requirements
|
2021-12-13 18:46:07 +00:00
|
|
|
|
BuildRequires: %{python_module aiosignal >= 1.1.2}
|
2022-11-08 07:22:30 +00:00
|
|
|
|
BuildRequires: %{python_module async_timeout >= 4.0 with %python-async_timeout < 5}
|
2019-06-04 15:42:37 +00:00
|
|
|
|
BuildRequires: %{python_module attrs >= 17.3.0}
|
2022-11-08 07:22:30 +00:00
|
|
|
|
BuildRequires: %{python_module charset-normalizer >= 2.0 with %python-charset-normalizer < 4}
|
2021-12-13 18:46:07 +00:00
|
|
|
|
BuildRequires: %{python_module frozenlist >= 1.1.1}
|
2022-11-08 07:22:30 +00:00
|
|
|
|
BuildRequires: %{python_module multidict >= 4.5 with %python-multidict < 7}
|
|
|
|
|
BuildRequires: %{python_module yarl >= 1.0 with %python-yarl < 2}
|
|
|
|
|
# /SECTION
|
2017-09-08 17:35:05 +00:00
|
|
|
|
# SECTION test requirements
|
2020-10-29 10:37:40 +00:00
|
|
|
|
BuildRequires: %{python_module aiodns}
|
2023-09-11 20:43:13 +00:00
|
|
|
|
BuildRequires: %{python_module Brotli}
|
2021-12-13 18:46:07 +00:00
|
|
|
|
BuildRequires: %{python_module freezegun}
|
2017-09-01 14:36:11 +00:00
|
|
|
|
BuildRequires: %{python_module gunicorn}
|
2017-12-06 09:27:11 +00:00
|
|
|
|
BuildRequires: %{python_module pluggy}
|
2021-12-13 18:46:07 +00:00
|
|
|
|
BuildRequires: %{python_module proxy.py}
|
2023-03-16 07:32:31 +00:00
|
|
|
|
BuildRequires: %{python_module pytest >= 6.2.0}
|
2017-09-11 15:42:42 +00:00
|
|
|
|
BuildRequires: %{python_module pytest-mock}
|
2017-09-08 17:35:05 +00:00
|
|
|
|
BuildRequires: %{python_module pytest-timeout}
|
2023-11-26 01:07:55 +00:00
|
|
|
|
BuildRequires: %{python_module pytest-xdist}
|
|
|
|
|
BuildRequires: %{python_module time-machine}
|
2019-02-27 14:32:14 +00:00
|
|
|
|
BuildRequires: %{python_module trustme}
|
2017-09-08 17:35:05 +00:00
|
|
|
|
# /SECTION
|
|
|
|
|
# SECTION docs
|
2021-12-13 18:46:07 +00:00
|
|
|
|
%if %{with docs}
|
2022-03-28 15:10:57 +00:00
|
|
|
|
BuildRequires: python3-MarkupSafe
|
2018-02-17 19:07:09 +00:00
|
|
|
|
BuildRequires: python3-Pygments >= 2.1
|
2017-09-08 17:35:05 +00:00
|
|
|
|
BuildRequires: python3-Sphinx
|
2018-02-17 19:07:09 +00:00
|
|
|
|
BuildRequires: python3-aiohttp-theme
|
2017-09-08 17:35:05 +00:00
|
|
|
|
BuildRequires: python3-sphinxcontrib-asyncio
|
2018-03-23 16:04:53 +00:00
|
|
|
|
BuildRequires: python3-sphinxcontrib-blockdiag
|
2017-09-08 17:35:05 +00:00
|
|
|
|
BuildRequires: python3-sphinxcontrib-newsfeed
|
2021-12-13 18:46:07 +00:00
|
|
|
|
BuildRequires: python3-sphinxcontrib-towncrier
|
|
|
|
|
%endif
|
2017-09-08 17:35:05 +00:00
|
|
|
|
# /SECTION
|
2017-09-01 14:36:11 +00:00
|
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
|
|
%description
|
2017-09-11 15:42:42 +00:00
|
|
|
|
Asynchronous HTTP client/server framework for Python.
|
2017-09-08 17:35:05 +00:00
|
|
|
|
|
2017-09-11 15:42:42 +00: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 17:35:05 +00:00
|
|
|
|
|
2023-04-26 21:30:25 +00:00
|
|
|
|
%package -n %{name}-doc
|
|
|
|
|
Summary: Documentation files for %{name}
|
|
|
|
|
|
2017-09-08 17:35:05 +00:00
|
|
|
|
%description -n %{name}-doc
|
2018-04-14 06:45:33 +00:00
|
|
|
|
HTML documentation on the API and examples for %{name}.
|
2017-09-01 14:36:11 +00:00
|
|
|
|
|
|
|
|
|
%prep
|
2021-05-13 22:26:12 +00:00
|
|
|
|
%autosetup -p1 -n aiohttp-%{version}
|
|
|
|
|
|
2021-12-13 18:46:07 +00:00
|
|
|
|
# don't check coverage
|
|
|
|
|
sed -i '/--cov/d' setup.cfg
|
2020-12-20 15:42:25 +00:00
|
|
|
|
|
2017-09-01 14:36:11 +00:00
|
|
|
|
%build
|
|
|
|
|
export CFLAGS="%{optflags}"
|
2022-11-08 07:22:30 +00:00
|
|
|
|
%pyproject_wheel
|
2021-12-13 18:46:07 +00:00
|
|
|
|
%if %{with docs}
|
2017-09-08 17:35:05 +00:00
|
|
|
|
pushd docs
|
2020-03-10 08:36:10 +00:00
|
|
|
|
%make_build html
|
2017-09-08 17:35:05 +00:00
|
|
|
|
rm _build/html/.buildinfo
|
|
|
|
|
popd
|
2021-12-13 18:46:07 +00:00
|
|
|
|
%endif
|
2017-09-01 14:36:11 +00:00
|
|
|
|
|
|
|
|
|
%install
|
2022-11-08 07:22:30 +00:00
|
|
|
|
%pyproject_install
|
2017-09-08 17:35:05 +00:00
|
|
|
|
%{python_expand %fdupes %{buildroot}%{$python_sitearch}
|
2020-12-04 15:14:54 +00:00
|
|
|
|
find %{buildroot}%{$python_sitearch} -name '*.[ch]' -delete
|
|
|
|
|
rm -r %{buildroot}%{$python_sitearch}/aiohttp/.hash
|
2017-09-08 17:35:05 +00:00
|
|
|
|
}
|
2017-09-01 14:36:11 +00:00
|
|
|
|
|
|
|
|
|
%check
|
2022-10-04 20:32:08 +00:00
|
|
|
|
donttest="test_aiohttp_request_coroutine or test_mark_formdata_as_processed or test_aiohttp_plugin_async or test_secure_https_proxy_absolute_path"
|
2021-12-13 18:46:07 +00:00
|
|
|
|
# no name resolution
|
|
|
|
|
donttest+=" or test_client_session_timeout_zero or test_requote_redirect_url_default"
|
|
|
|
|
# flaky
|
|
|
|
|
donttest+=" or test_https_proxy_unsupported_tls_in_tls"
|
2022-10-04 20:32:08 +00:00
|
|
|
|
# not running under pytest ?!
|
2023-12-02 17:28:17 +00:00
|
|
|
|
donttest+=" or test_circular_imports test_import_time"
|
2023-11-26 01:16:12 +00:00
|
|
|
|
# requires python-on-whales
|
|
|
|
|
rm -v tests/autobahn/test_autobahn.py
|
2023-11-26 01:07:55 +00:00
|
|
|
|
test -d aiohttp && mv aiohttp aiohttp.bkp
|
|
|
|
|
%pytest_arch %{?jobs: -n %jobs} tests -k "not ($donttest ${$python_donttest})"
|
2017-09-01 14:36:11 +00:00
|
|
|
|
|
|
|
|
|
%files %{python_files}
|
2018-04-14 06:45:33 +00:00
|
|
|
|
%license LICENSE.txt
|
2020-03-10 08:36:10 +00:00
|
|
|
|
%doc CHANGES.rst CONTRIBUTORS.txt README.rst
|
2020-12-04 15:14:54 +00:00
|
|
|
|
%{python_sitearch}/aiohttp
|
|
|
|
|
%{python_sitearch}/aiohttp-%{version}*-info
|
2017-09-01 14:36:11 +00:00
|
|
|
|
|
2021-12-13 18:46:07 +00:00
|
|
|
|
%if %{with docs}
|
2023-04-26 21:30:25 +00:00
|
|
|
|
%if 0%{?suse_version} > 1500
|
2017-09-08 17:35:05 +00:00
|
|
|
|
%files -n %{name}-doc
|
2023-04-26 21:30:25 +00:00
|
|
|
|
%endif
|
2017-09-08 17:35:05 +00:00
|
|
|
|
%doc docs/_build/html
|
2021-12-13 18:46:07 +00:00
|
|
|
|
%endif
|
2017-09-08 17:35:05 +00:00
|
|
|
|
|
2017-09-01 14:36:11 +00:00
|
|
|
|
%changelog
|