%if 0%{?fedora}
%global with_python3 1
%endif
%global pypi_name requestsexceptions
Name: python-%{pypi_name}
Version: 1.1.1
Release: 7%{?dist}
Summary: Import exceptions from potentially bundled packages in requests
License: ASL 2.0
URL: http://www.openstack.org/
Source0: https://pypi.python.org/packages/source/r/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
BuildArch: noarch
%description
This is a simple library to find the correct path to exceptions in the
requests library regardless of whether they are bundled.
%package -n python2-%{pypi_name}
Summary: Import exceptions from potentially bundled packages in requests
%{?python_provide:%python_provide python2-%{pypi_name}}
BuildRequires: python2-devel
BuildRequires: python-pbr
%description -n python2-%{pypi_name}
This is a simple library to find the correct path to exceptions in the
requests library regardless of whether they are bundled.
%if 0%{?with_python3}
%package -n python3-%{pypi_name}
Summary: Import exceptions from potentially bundled packages in requests
%{?python_provide:%python_provide python3-%{pypi_name}}
BuildRequires: python3-devel
BuildRequires: python3-pbr
%description -n python3-%{pypi_name}
This is a simple library to find the correct path to exceptions in the
requests library regardless of whether they are bundled.
%endif
%prep
%autosetup -n %{pypi_name}-%{version}
%build
%py2_build
%if 0%{?with_python3}
%py3_build
%endif
%install
%py2_install
%if 0%{?with_python3}
%py3_install
%endif
%files -n python2-%{pypi_name}
%doc README.rst
%license LICENSE
%{python2_sitelib}/%{pypi_name}
%{python2_sitelib}/*.egg-info
%if 0%{?with_python3}
%files -n python3-%{pypi_name}
%doc README.rst
%license LICENSE
%{python3_sitelib}/%{pypi_name}
%{python3_sitelib}/*.egg-info
%endif
%changelog
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Mon Dec 19 2016 Miro HronĨok <mhroncok@redhat.com> - 1.1.1-6
- Rebuild for Python 3.6
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.1-5
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Wed Nov 25 2015 jpena <jpena@redhat.com> - 1.1.1-3
- Added Python 3 subpackage
* Mon Nov 23 2015 jpena <jpena@redhat.com> - 1.1.1-2
- Used macros for prep, build and install
* Tue Nov 17 2015 jpena <jpena@redhat.com> - 1.1.1-1
- Initial package.