2b40ffe
%global pypi_name treq
2b40ffe
2b40ffe
65d408b
%global with_doc 1
2b40ffe
2b40ffe
Name:           python-%{pypi_name}
55ec38e
Version:        21.1.0
55ec38e
Release:        1%{?dist}
2b40ffe
Summary:        A requests-like API built on top of twisted.web's Agent
2b40ffe
2b40ffe
License:        MIT
2b40ffe
URL:            https://github.com/twisted/treq
2b40ffe
Source0:        https://files.pythonhosted.org/packages/source/t/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
2b40ffe
BuildArch:      noarch
65d408b
2b40ffe
%if 0%{?with_doc}
e2f8ec3
BuildRequires:  python3-twisted
e2f8ec3
BuildRequires:  python3-sphinx
2b40ffe
%endif
2b40ffe
 
2b40ffe
BuildRequires:  python3-devel
2b40ffe
BuildRequires:  python3-setuptools
65d408b
BuildRequires:  python3-incremental
2b40ffe
2b40ffe
%description
2b40ffe
treq is an HTTP library inspired by requests but written on top of
2b40ffe
Twisted’s Agents.
2b40ffe
It provides a simple, higher level API for making HTTP requests
2b40ffe
when using Twisted.
2b40ffe
2b40ffe
%package -n     python3-%{pypi_name}
2b40ffe
Summary:        %{summary}
2b40ffe
%{?python_provide:%python_provide python3-%{pypi_name}}
2b40ffe
 
65d408b
Requires:       python3-incremental
2b40ffe
Requires:       python3-requests >= 2.1.0
2b40ffe
Requires:       python3-six
2b40ffe
Requires:       python3-twisted >= 16.3.0
2b40ffe
Requires:       python3-attrs
2b40ffe
%description -n python3-%{pypi_name}
2b40ffe
treq is an HTTP library inspired by requests but written on top of
2b40ffe
Twisted’s Agents.
2b40ffe
It provides a simple, higher level API for making HTTP requests
2b40ffe
when using Twisted.
2b40ffe
2b40ffe
%if 0%{?with_doc}
2b40ffe
%package -n python-%{pypi_name}-doc
2b40ffe
Summary:        treq documentation
2b40ffe
%description -n python-%{pypi_name}-doc
2b40ffe
Documentation for treq
2b40ffe
%endif
2b40ffe
2b40ffe
%prep
2b40ffe
%autosetup -n %{pypi_name}-%{version}
2b40ffe
2b40ffe
# Remove bundled egg-info
2b40ffe
rm -rf %{pypi_name}.egg-info
2b40ffe
2b40ffe
%build
2b40ffe
%py3_build
2b40ffe
%if 0%{?with_doc}
65d408b
# generate html docs
2b40ffe
export PYTHONPATH=%{python2_sitelib}:%{python3_sitelib}:src
2b40ffe
sphinx-build docs html
2b40ffe
# remove the sphinx-build leftovers
2b40ffe
rm -rf html/.{doctrees,buildinfo}
2b40ffe
%endif
2b40ffe
2b40ffe
%install
2b40ffe
%py3_install
2b40ffe
2b40ffe
2b40ffe
%files -n python3-%{pypi_name}
2b40ffe
%license LICENSE
2b40ffe
%doc README.rst
2b40ffe
%{python3_sitelib}/%{pypi_name}
d9e8dd7
%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info
2b40ffe
2b40ffe
%if 0%{?with_doc}
2b40ffe
%files -n python-%{pypi_name}-doc
2b40ffe
%license LICENSE
65d408b
%doc html
2b40ffe
%endif
2b40ffe
2b40ffe
%changelog
55ec38e
* Tue Apr 27 2021 Dan Callaghan <djc@djc.id.au> - 21.1.0-1
55ec38e
- Update to 21.1.0 (RHBZ#1813778, RHBZ#1953535)
55ec38e
e50edb3
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 18.6.0-5
e50edb3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
e50edb3
5059830
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 18.6.0-4
5059830
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
5059830
40c952c
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 18.6.0-3
40c952c
- Rebuilt for Python 3.9
40c952c
e07f2ad
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 18.6.0-2
e07f2ad
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
e07f2ad
458a032
* Tue Nov 19 2019 Orion Poplawski <orion@nwra.com> - 18.6.0-1
458a032
- Update to 18.6.0
458a032
b6e5ea3
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 17.8.0-10
b6e5ea3
- Rebuilt for Python 3.8.0rc1 (#1748018)
b6e5ea3
a1a98b3
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 17.8.0-9
a1a98b3
- Rebuilt for Python 3.8
a1a98b3
0f49d5e
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 17.8.0-8
0f49d5e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
0f49d5e
07eb17d
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 17.8.0-7
07eb17d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
07eb17d
e2f8ec3
* Fri Oct 12 2018 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 17.8.0-6
e2f8ec3
- Python2 binary package has been removed
e2f8ec3
  See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
e2f8ec3
5906300
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 17.8.0-5
5906300
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
5906300
9a552d5
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 17.8.0-4
9a552d5
- Rebuilt for Python 3.7
9a552d5
f26527c
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 17.8.0-3
f26527c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
f26527c
65d408b
* Wed Aug 30 2017 Yatin Karel <ykarel@redhat.com> - 17.8.0-2
65d408b
- Enabled Doc build, Fix BR Issues and some nit picks
65d408b
2b40ffe
* Fri Aug 11 2017 ykarel <ykarel@redhat.com> - 17.8.0-1
2b40ffe
- Initial package.