Blob Blame History Raw
%global srcname requests-toolbelt
%global sum     A utility belt for advanced users of python-requests

Name:           python-%{srcname}
Version:        0.6.1
Release:        1%{?dist}
Summary:        %{sum}

%{?python_provide:%python_provide python-%{srcname}}

License:        ASL 2.0
URL:            https://toolbelt.readthedocs.org/
Source0:        https://pypi.python.org/packages/02/de/c51e243312db29cecad11958f2f961340dd7b5f724fd48f2776cd5ea15f5/%{srcname}-%{version}.tar.gz

BuildArch:      noarch
BuildRequires:  python2-devel python3-devel
BuildRequires:  python-requests
BuildRequires:  python-betamax
BuildRequires:  python-mock
BuildRequires:  pytest
BuildRequires:  python-setuptools python3-setuptools

%description
This is just a collection of utilities for python-requests, but don’t really
belong in requests proper.


%package -n python3-%{srcname}
Summary:        %{sum}
BuildRequires:  python3-requests
BuildRequires:  python3-betamax
BuildRequires:  python3-mock
BuildRequires:  python3-pytest

%{?python_provide:%python_provide python3-%{srcname}}

%description -n python3-%{srcname}
This is just a collection of utilities for python-requests, but don’t really
belong in requests proper.


%prep
%autosetup -n %{srcname}-%{version}

%build
%py2_build
%py3_build

%install
# Must do the python2 install first because the scripts in /usr/bin are
# overwritten with every setup.py install, and in general we want the
# python3 version to be the default.
%py2_install
%py3_install

%check
%{__python2} setup.py test
%{__python3} setup.py test

# Note that there is no %%files section for the unversioned python module if we are building for several python runtimes
%files -n python-%{srcname}
%doc PKG-INFO
%license LICENSE
%{python2_sitelib}/requests_toolbelt
%{python2_sitelib}/requests_toolbelt-%{version}-py2.*.egg-info

%files -n python3-%{srcname}
%doc PKG-INFO
%license LICENSE
%{python3_sitelib}/requests_toolbelt
%{python3_sitelib}/requests_toolbelt-%{version}-py3.*.egg-info

%changelog
* Mon May 09 2016 Parag Nemade <pnemade AT redhat DOT com> - 0.6.1-1
- update to 0.6.1 release

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Thu Jan 28 2016 Parag Nemade <pnemade AT redhat DOT com> - 0.6.0-1
- update to 0.6.0 release

* Mon Dec 21 2015 Parag Nemade <pnemade AT redhat DOT com> - 0.5.1-1
- update to 0.5.1 release

* Thu Nov 26 2015 Parag Nemade <pnemade AT redhat DOT com> - 0.5.0-1
- update to 0.5.0 release

* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.0-3
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5

* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Mon Apr 06 2015 Parag Nemade <pnemade AT redhat DOT com> - 0.4.0-1
- update to 0.4.0 release

* Fri Feb 13 2015 Parag Nemade <pnemade AT redhat DOT com> - 0.3.1-2
- Add missing LICENSE file

* Mon Feb 02 2015 Parag Nemade <pnemade AT redhat DOT com> - 0.3.1-1
- Initial packaging