Alan Pevec a795d58
%if 0%{?fedora}
Alan Pevec a795d58
%global with_python3 1
Alan Pevec a795d58
%endif
Alan Pevec a795d58
Jamie Lennox 3707d7c
Name:           python-requests-mock
a3e9150
Version:        1.5.2
2d39603
Release:        1%{?dist}
Jamie Lennox 3707d7c
Summary:        A requests mocking tool for python
Jamie Lennox 3707d7c
Jamie Lennox 3707d7c
License:        ASL 2.0
2dd99ce
URL:            https://requests-mock.readthedocs.io/
3622938
Source0:        https://pypi.io/packages/source/r/requests-mock/requests-mock-%{version}.tar.gz
Jamie Lennox 3707d7c
2dd99ce
Patch0:         0002-Use-system-urllib3-package.patch
Jamie Lennox 3707d7c
Jamie Lennox 3707d7c
BuildArch:      noarch
Jamie Lennox 3707d7c
c9d8a11
%description
c9d8a11
requests-mock provides a simple way to do HTTP mocking at the
c9d8a11
python-requests layer.
c9d8a11
c9d8a11
%package -n python2-requests-mock
c9d8a11
Summary:        A requests mocking tool for python
c9d8a11
a0c188d
Requires:       python2-requests
a0c188d
Requires:       python2-six
Jamie Lennox 3707d7c
Jamie Lennox 3707d7c
# urllib3 required because requests packaging uses it and our patch uses it
8ea17da
Requires:       python%{?fedora:2}-urllib3
Jamie Lennox 3707d7c
2dd99ce
# This {?fedora:2} syntax is because it's python2- on f28+ but just python- on
644c77f
# epel still. Hopefully this can be removed when epel is fixed.
644c77f
BuildRequires:  python%{?fedora:2}-urllib3
644c77f
BuildRequires:  python%{?fedora:2}-fixtures
644c77f
BuildRequires:  python%{?fedora:2}-testtools
644c77f
Jamie Lennox 3707d7c
# standard requirements needed for testing
a0c188d
BuildRequires:  python2-requests
a0c188d
BuildRequires:  python2-six
Jamie Lennox 3707d7c
Jamie Lennox 3707d7c
BuildRequires:  python2-devel
a0c188d
BuildRequires:  python2-mock
a0c188d
BuildRequires:  python2-pbr
a0c188d
BuildRequires:  python2-setuptools
2d39603
BuildRequires:  python2-pytest
c9d8a11
Alan Pevec b57abc0
%if 0%{?rhel} && 0%{?rhel} <= 6
Alan Pevec b57abc0
BuildRequires:  python-discover
Alan Pevec b57abc0
%endif
Jamie Lennox 3707d7c
c9d8a11
%{?python_provide:%python_provide python2-requests-mock}
Jamie Lennox 3707d7c
c9d8a11
c9d8a11
%description -n python2-requests-mock
Jamie Lennox 3707d7c
requests-mock provides a simple way to do HTTP mocking at the
Jamie Lennox 3707d7c
python-requests layer.
Jamie Lennox 3707d7c
Jamie Lennox 3707d7c
Alan Pevec a795d58
%if 0%{?with_python3}
Jamie Lennox 3707d7c
%package -n python3-requests-mock
Jamie Lennox 3707d7c
Summary:        A requests mocking tool for python
Jamie Lennox 3707d7c
Jamie Lennox 3707d7c
Requires:       python3-requests
Jamie Lennox 3707d7c
Requires:       python3-six
Jamie Lennox 3707d7c
Jamie Lennox 3707d7c
# urllib3 required because requests packaging uses it and our patch uses it
Jamie Lennox 3707d7c
Requires:       python3-urllib3
Jamie Lennox 3707d7c
Jamie Lennox 3707d7c
# standard requirements needed for testing
Jamie Lennox 3707d7c
BuildRequires:  python3-requests
Jamie Lennox 3707d7c
BuildRequires:  python3-six
Jamie Lennox 3707d7c
BuildRequires:  python3-urllib3
Jamie Lennox 3707d7c
Jamie Lennox 3707d7c
BuildRequires:  python3-devel
Jamie Lennox 3707d7c
BuildRequires:  python3-fixtures
Jamie Lennox 3707d7c
BuildRequires:  python3-mock
Jamie Lennox 3707d7c
BuildRequires:  python3-pbr
Jamie Lennox 3707d7c
BuildRequires:  python3-setuptools
Jamie Lennox 3707d7c
BuildRequires:  python3-testtools
2d39603
BuildRequires:  python3-pytest
Jamie Lennox 3707d7c
c9d8a11
%{?python_provide:%python_provide python3-requests-mock}
c9d8a11
Jamie Lennox 3707d7c
Jamie Lennox 3707d7c
%description -n python3-requests-mock
Jamie Lennox 3707d7c
requests-mock provides a simple way to do HTTP mocking at the
Jamie Lennox 3707d7c
python-requests layer.
Alan Pevec a795d58
%endif
Jamie Lennox 3707d7c
Jamie Lennox 3707d7c
Jamie Lennox 3707d7c
%prep
Jamie Lennox 3707d7c
%setup -q -n requests-mock-%{version}
Jamie Lennox 3707d7c
%patch0 -p1
Jamie Lennox 3707d7c
Jamie Lennox 3707d7c
# Remove bundled egg-info
Jamie Lennox 3707d7c
rm -rf requests_mock.egg-info
Jamie Lennox 3707d7c
Jamie Lennox 3707d7c
Jamie Lennox 3707d7c
%build
c9d8a11
%py2_build
Jamie Lennox 3707d7c
Alan Pevec a795d58
%if 0%{?with_python3}
c9d8a11
%py3_build
Alan Pevec a795d58
%endif
Jamie Lennox 3707d7c
Jamie Lennox 3707d7c
Jamie Lennox 3707d7c
%install
c9d8a11
%py2_install
Jamie Lennox 3707d7c
Alan Pevec a795d58
%if 0%{?with_python3}
c9d8a11
%py3_install
Alan Pevec a795d58
%endif
Jamie Lennox 3707d7c
Jamie Lennox 3707d7c
Jamie Lennox 3707d7c
%check
Jamie Lennox 3707d7c
%{__python2} -m testtools.run discover
2d39603
%{__python2} -m pytest tests/pytest
Jamie Lennox 3707d7c
Alan Pevec a795d58
%if 0%{?with_python3}
Jamie Lennox 3707d7c
%{__python3} -m testtools.run discover
2d39603
%{__python3} -m pytest tests/pytest
Alan Pevec a795d58
%endif
Jamie Lennox 3707d7c
Jamie Lennox 3707d7c
93bd60d
%files -n python2-requests-mock
Alan Pevec a57fd0e
%license LICENSE
Alan Pevec a57fd0e
%doc README.rst ChangeLog
3622938
%{python2_sitelib}/requests_mock
8ea17da
%{python2_sitelib}/requests_mock-%{version}-py%{python2_version}.egg-info
Jamie Lennox 3707d7c
Jamie Lennox 3707d7c
Alan Pevec a795d58
%if 0%{?with_python3}
Jamie Lennox 3707d7c
%files -n python3-requests-mock
Alan Pevec a57fd0e
%license LICENSE
Alan Pevec a57fd0e
%doc README.rst ChangeLog
Jamie Lennox 3707d7c
%{python3_sitelib}/requests_mock
8ea17da
%{python3_sitelib}/requests_mock-%{version}-py%{python3_version}.egg-info
Alan Pevec a795d58
%endif
Jamie Lennox 3707d7c
Jamie Lennox 3707d7c
Jamie Lennox 3707d7c
%changelog
a3e9150
* Sat Jul 21 2018 Jamie Lennox <jamielennox@gmail.com> - 1.5.2-1
a3e9150
- Update to upstream 1.5.2.
a3e9150
- Fix bug introduced in 1.5.1
a3e9150
2d39603
* Sat Jul 21 2018 Jamie Lennox <jamielennox@gmail.com> - 1.5.1-1
2d39603
- Update to upstream 1.5.1.
2d39603
- Fixes py.test plugin with py.test<3 as in EPEL.
2d39603
828b2a0
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.0-3
828b2a0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
828b2a0
de69bba
* Mon Jul 02 2018 Miro Hrončok <mhroncok@redhat.com> - 1.5.0-2
de69bba
- Rebuilt for Python 3.7
de69bba
2dd99ce
* Sat Jun 23 2018 Jamie Lennox <jamielennox@gmail.com>- 1.5.0-1
2dd99ce
- Update to upstream 1.5.0.
2dd99ce
8ea17da
* Fri Jun 22 2018 Carl George <carl@george.computer> - 1.3.0-6
8ea17da
- EPEL compatibility
8ea17da
f7cf3b0
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 1.3.0-5
f7cf3b0
- Rebuilt for Python 3.7
f7cf3b0
a0c188d
* Wed Feb 28 2018 Iryna Shcherbina <ishcherb@redhat.com> - 1.3.0-4
a0c188d
- Update Python 2 dependency declarations to new packaging standards
a0c188d
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
a0c188d
c9d0e50
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-3
c9d0e50
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
c9d0e50
93bd60d
* Sun Dec 17 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.3.0-2
93bd60d
- Fix creation of python2- subpackage
93bd60d
182e62b
* Fri Nov 17 2017 Alfredo Moralejo <amoralej@redhat.com> - 1.3.0-1
182e62b
- Update to upstream 1.3.0. Required for OpenStack packages.
182e62b
1194479
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-3
1194479
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
1194479
0af42f3
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-2
0af42f3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
0af42f3
bd6c4c1
* Thu Dec 22 2016 Jamie Lennox <jamielennox@gmail.com> - 1.2.0-1
bd6c4c1
- Upstream 1.2.0. Fixes testing bug preventing package rebuilding.
bd6c4c1
780ca6c
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 1.1.0-2
780ca6c
- Rebuild for Python 3.6
780ca6c
b9cab1b
* Mon Nov 14 2016 Haïkel Guémar <hguemar@fedoraproject.org> - 1.1.0-1
b9cab1b
- Upstream 1.1.0
b9cab1b
6cffc0b
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.0-2
6cffc0b
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
6cffc0b
3622938
* Mon Jun 27 2016 Haïkel Guémar <hguemar@fedoraproject.org> - 1.0.0-1
3622938
- Upstream 1.0.0 (RHBZ#1334354)
3622938
- Use pypi.io for SourceURL
3622938
- Fix unversioned python macros
3622938
51fe7ae
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.0-2
51fe7ae
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
51fe7ae
c9d8a11
* Fri Dec 4 2015 Jamie Lennox <jamielennox@gmail.com> - 0.7.0-1
c9d8a11
- Update package to new version.
c9d8a11
- Add python2 subpackage for new python packaging guidelines.
c9d8a11
- Redo patch1 to still apply.
c9d8a11
8758727
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.0-3
8758727
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
8758727
e81c5f4
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.0-2
e81c5f4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
e81c5f4
Jamie Lennox 7b0e983
* Fri Feb 6 2015 Jamie Lennox <jamielennox@redhat.com> - 0.6.0-1
Jamie Lennox 7b0e983
- Update package to new version
Jamie Lennox 7b0e983
Jamie Lennox 3707d7c
* Tue Sep 2 2014 Jamie Lennox <jamielennox@redhat.com> - 0.5.1-2
Jamie Lennox 3707d7c
- Removed packaged egg-info to force rebuild.
Jamie Lennox 3707d7c
- Removed unneeded CFLAGS from build commands.
Jamie Lennox 3707d7c
Jamie Lennox 3707d7c
* Thu Aug 28 2014 Jamie Lennox <jamielennox@redhat.com> - 0.5.1-1
Jamie Lennox 3707d7c
- Initial Package.