c2f81b7
%global         srcname  aioresponses
c2f81b7
%global         desc     Aioresponses is a helper to mock/fake web requests in the python\
c2f81b7
aiohttp package. The purpose of this package is to provide an\
c2f81b7
easy way  to test asynchronous HTTP requests.
c2f81b7
c2f81b7
Name:           python-%{srcname}
80c9940
Version:        0.7.3
80c9940
Release:        1%{?dist}
c2f81b7
Summary:        Mock out requests made by ClientSession from aiohttp package
c2f81b7
c2f81b7
License:        MIT
c2f81b7
URL:            https://github.com/pnuckowski/aioresponses
c2f81b7
Source0:        %pypi_source
c2f81b7
c2f81b7
BuildArch:      noarch
88e58d4
# Since python-aiohttp excludes s390x we have to exclude it, as well
88e58d4
# See also:
88e58d4
# https://src.fedoraproject.org/rpms/python-aiohttp/blob/67855c61bee706fcd99305d1715aad02d898cbfc/f/python-aiohttp.spec#_22
88e58d4
# https://fedoraproject.org/wiki/EPEL/FAQ#RHEL_8.2B_has_binaries_in_the_release.2C_but_is_missing_some_corresponding_-devel_package._How_do_I_build_a_package_that_needs_that_missing_-devel_package.3F
023f9b8
%if %{defined el8}
88e58d4
ExcludeArch:    s390x
023f9b8
%endif
88e58d4
c2f81b7
c2f81b7
# required for py3_build macro
c2f81b7
BuildRequires:  python3-devel
c2f81b7
c2f81b7
# from setup.py
c2f81b7
BuildRequires: python3-pbr
c2f81b7
BuildRequires: python3-aiohttp
c2f81b7
c2f81b7
## for tests
c2f81b7
BuildRequires: python3-pytest
c2f81b7
BuildRequires: python3-pytest-cov
c2f81b7
BuildRequires: python3-ddt
c2f81b7
c2f81b7
%{?python_enable_dependency_generator}
c2f81b7
c2f81b7
%description
c2f81b7
%{desc}
c2f81b7
c2f81b7
%package -n python3-%{srcname}
c2f81b7
Summary:        %{summary}
c2f81b7
%{?python_provide:%python_provide python3-%{srcname}}
c2f81b7
c2f81b7
%description -n python3-%{srcname}
c2f81b7
%{desc}
c2f81b7
c2f81b7
%prep
c2f81b7
%autosetup -p1 -n %{srcname}-%{version}
c2f81b7
c2f81b7
# disable one test that connects to httpbin.org
c2f81b7
sed -i 's/def \(test_address_as_instance_of_url_combined_with_pass_through\)(/def skip_\1(/' tests/test_aioresponses.py
c2f81b7
80c9940
# fix version string
80c9940
# XXX TODO remove again with next release
80c9940
sed "s/\(^__version__ = '\)0.7.2'/\10.7.3'/" aioresponses/__init__.py -i
80c9940
c2f81b7
%build
c2f81b7
%py3_build
c2f81b7
c2f81b7
c2f81b7
%install
c2f81b7
%py3_install
c2f81b7
c2f81b7
%check
5a54f54
# disable some tests for now because of broken asynctest dependency
5a54f54
rm tests/test_aioresponses.py
5a54f54
c2f81b7
%{__python3} setup.py test
c2f81b7
c2f81b7
%files -n python3-%{srcname}
c2f81b7
%license LICENSE
c2f81b7
%doc README.rst
c2f81b7
%{python3_sitelib}/%{srcname}/
c2f81b7
%{python3_sitelib}/%{srcname}-*-py*.egg-info/
c2f81b7
c2f81b7
c2f81b7
%changelog
80c9940
* Sat Feb 05 2022 Georg Sauthoff <mail@gms.tf> - 0.7.3-1
80c9940
- bump version (fixes fedora#2039096)
80c9940
9f504ca
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.2-6
9f504ca
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
9f504ca
023f9b8
* Tue Dec 14 2021 Georg Sauthoff <mail@gms.tf> - 0.7.2-5
023f9b8
- Fix dependency issue in rawhide -> rollback (cf. #2026630)
023f9b8
0d7d539
* Tue Dec 14 2021 Georg Sauthoff <mail@gms.tf> - 0.7.2-4
023f9b8
- Fix dependency issue in rawhide
0d7d539
5457796
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.2-3
5457796
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
5457796
ae9c049
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 0.7.2-2
ae9c049
- Rebuilt for Python 3.10
ae9c049
f8be460
* Sat Mar 20 2021 Georg Sauthoff <mail@gms.tf> - 0.7.2-1
f8be460
- bump version (fixes fedora#1936797 - python-aioresponses-0.7.2 is available)
f8be460
fc52c4d
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.1-2
fc52c4d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
fc52c4d
c3da382
* Sat Dec 05 2020 Georg Sauthoff <mail@gms.tf> - 0.7.1-1
c3da382
- bump version
c3da382
88e58d4
* Thu Sep 10 2020 Georg Sauthoff <mail@gms.tf> - 0.6.4-3
88e58d4
- EPEL8: exclude s390x because of aiohttp
88e58d4
0b6b128
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.4-2
0b6b128
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
0b6b128
5a54f54
* Sun Jun 21 2020 Georg Sauthoff <mail@gms.tf> - 0.6.4-1
5a54f54
- Skip asynctest dependency for Python 3.9
5a54f54
- bump to latest upstream
5a54f54
6c7114e
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 0.6.3-2
6c7114e
- Rebuilt for Python 3.9
6c7114e
7649842
* Fri May 01 2020  Georg Sauthoff <mail@gms.tf> - 0.6.3-1
7649842
- bump to latest upstream
7649842
a31d079
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.1-3
a31d079
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
a31d079
e2d98ba
* Sun Dec 08 2019  Georg Sauthoff <mail@gms.tf> - 0.6.1-2
896745f
- bump to latest upstream
896745f
e2d98ba
* Sun Dec 08 2019  Georg Sauthoff <mail@gms.tf> - 0.6.1-1
e2d98ba
- bump to latest upstream
e2d98ba
e2d98ba
* Fri Dec 06 2019 Georg Sauthoff <mail@gms.tf> - 0.6.0-4
fa32396
- remove superfluous watchdog dependency
fa32396
c2f43f3
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 0.6.0-3
c2f43f3
- Rebuilt for Python 3.8
c2f43f3
957fa3b
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-2
957fa3b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
957fa3b
c2f81b7
* Tue Mar 26 2019 Georg Sauthoff <mail@gms.tf> - 0.6.0-1
c2f81b7
- initial packaging