7353b56
%global pypi_name requests-futures
7353b56
%bcond_with network
7353b56
7353b56
Name:           python-%{pypi_name}
7353b56
Version:        1.0.0
7353b56
Release:        2%{?dist}
7353b56
Summary:        Asynchronous Python HTTP Requests
7353b56
7353b56
License:        ASL 2.0
7353b56
URL:            https://github.com/ross/requests-futures
7353b56
Source0:        %pypi_source
7353b56
BuildArch:      noarch
7353b56
7353b56
%description
7353b56
Small add-on for the Python requests http library. Makes use of Python 3.2’s
7353b56
concurrent.futures or the back-port for prior versions of Python.
7353b56
7353b56
%package -n python3-%{pypi_name}
7353b56
Summary:        %{summary}
7353b56
7353b56
BuildRequires:  python3-devel
7353b56
BuildRequires:  python3-requests
7353b56
BuildRequires:  python3-pytest
7353b56
%{?python_provide:%python_provide python3-%{pypi_name}}
7353b56
7353b56
%description -n python3-%{pypi_name}
7353b56
Small add-on for the Python requests http library. Makes use of Python 3.2’s
7353b56
concurrent.futures or the backport for prior versions of Python.
7353b56
7353b56
%prep
7353b56
%autosetup -n %{pypi_name}-%{version}
7353b56
7353b56
%build
7353b56
%py3_build
7353b56
7353b56
%install
7353b56
%py3_install
7353b56
7353b56
%check
7353b56
%if %{with network}
7353b56
pytest-%{python3_version} -v test_requests_futures.py
7353b56
%else
7353b56
pytest-%{python3_version} test_requests_futures.py::RequestsTestCase::test_adapter_kwargs \
7353b56
  test_requests_futures.py::RequestsTestCase::test_max_workers
7353b56
%endif
7353b56
7353b56
7353b56
%files
7353b56
%doc README.rst
7353b56
%license LICENSE
7353b56
%{python3_sitelib}/requests_futures/
7353b56
%{python3_sitelib}/requests_futures*.egg-info
7353b56
7353b56
%changelog
7353b56
* Mon Jan 06 2020 Fabian Affolter <mail@fabian-affolter.ch> - 1.0.0-2
7353b56
- Condition for test with network
7353b56
7353b56
* Sat Dec 28 2019 Fabian Affolter <mail@fabian-affolter.ch> - 1.0.0-1
7353b56
- Initial package for Fedora