cefd0cd
%if 0%{?rhel} >= 8
cefd0cd
# Disable tests on epel8 - dependencies dont exist.
cefd0cd
%bcond_with tests
cefd0cd
%else
cefd0cd
%bcond_without tests
cefd0cd
%endif
cefd0cd
Jamie Lennox 3707d7c
Name:           python-requests-mock
79fd594
Version:        1.10.0
79fd594
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
cefd0cd
Patch1:         0003-Allow-skipping-purl-tests-if-it-is-not-present.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
cefd0cd
cefd0cd
%package -n python%{python3_pkgversion}-requests-mock
Jamie Lennox 3707d7c
Summary:        A requests mocking tool for python
Jamie Lennox 3707d7c
cefd0cd
Requires:       python%{python3_pkgversion}-requests
cefd0cd
Requires:       python%{python3_pkgversion}-six
Jamie Lennox 3707d7c
Jamie Lennox 3707d7c
# standard requirements needed for testing
cefd0cd
BuildRequires:  python%{python3_pkgversion}-requests
cefd0cd
BuildRequires:  python%{python3_pkgversion}-six
cefd0cd
BuildRequires:  python%{python3_pkgversion}-urllib3
cefd0cd
cefd0cd
BuildRequires:  python%{python3_pkgversion}-devel
cefd0cd
BuildRequires:  python%{python3_pkgversion}-pbr
cefd0cd
BuildRequires:  python%{python3_pkgversion}-setuptools
Jamie Lennox 3707d7c
c9d8a11
%{?python_provide:%python_provide python3-requests-mock}
c9d8a11
cefd0cd
%if %{with tests}
cefd0cd
BuildRequires:  python%{python3_pkgversion}-fixtures
cefd0cd
BuildRequires:  python%{python3_pkgversion}-mock
cefd0cd
BuildRequires:  python%{python3_pkgversion}-testtools
cefd0cd
BuildRequires:  python%{python3_pkgversion}-pytest
79fd594
BuildRequires:  python-requests-futures
cefd0cd
%endif
cefd0cd
Jamie Lennox 3707d7c
cefd0cd
%description -n python%{python3_pkgversion}-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
Jamie Lennox 3707d7c
%prep
Jamie Lennox 3707d7c
%setup -q -n requests-mock-%{version}
Jamie Lennox 3707d7c
%patch0 -p1
cefd0cd
%patch1 -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
%py3_build
Jamie Lennox 3707d7c
Jamie Lennox 3707d7c
Jamie Lennox 3707d7c
%install
c9d8a11
%py3_install
Jamie Lennox 3707d7c
Jamie Lennox 3707d7c
Jamie Lennox 3707d7c
%check
cefd0cd
%if %{with tests}
Jamie Lennox 3707d7c
%{__python3} -m testtools.run discover
2d39603
%{__python3} -m pytest tests/pytest
Alan Pevec a795d58
%endif
Jamie Lennox 3707d7c
Jamie Lennox 3707d7c
cefd0cd
%files -n python%{python3_pkgversion}-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
Jamie Lennox 3707d7c
Jamie Lennox 3707d7c
Jamie Lennox 3707d7c
%changelog
79fd594
* Thu Dec 15 2022 Joel Capitao <jcapitao@redhat.com> - 1.10.0-1
79fd594
- Update to 1.10.0
79fd594
53a3abc
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.3-3
53a3abc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
53a3abc
3cad954
* Wed Jun 15 2022 Python Maint <python-maint@redhat.com> - 1.9.3-2
3cad954
- Rebuilt for Python 3.11
3cad954
dca0825
* Wed Feb 23 2022 Karolina Kula <kkula@redhat.com> - 1.9.3-1
dca0825
- Update to 1.9.3
dca0825
f821c5d
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.0-5
f821c5d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
f821c5d
3de9f74
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.0-4
3de9f74
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
3de9f74
3333f02
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 1.8.0-3
3333f02
- Rebuilt for Python 3.10
3333f02
f822851
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.0-2
f822851
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
f822851
7e3c3a1
* Tue Sep 15 2020 Joel Capitao <jcapitao@redhat.com> - 1.8.0-1
7e3c3a1
- Update to 1.8.0
7e3c3a1
- Remove Python 2 subpackage
7e3c3a1
b681140
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.0-4
b681140
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
b681140
95e548f
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 1.7.0-3
95e548f
- Rebuilt for Python 3.9
95e548f
32c5c70
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.0-2
32c5c70
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
32c5c70
cefd0cd
* Tue Dec 03 2019 Jamie Lennox <jamielennox@gmail.com> - 1.7.0-1
cefd0cd
- Updated to upstream 1.7.0
cefd0cd
- Conditionalized tests for EPEL8 not having required dependencies
cefd0cd
- Add patch to skip purl tests as dependency not present.
cefd0cd
bf65b5f
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 1.5.2-6
bf65b5f
- Rebuilt for Python 3.8.0rc1 (#1748018)
bf65b5f
e619c10
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 1.5.2-5
e619c10
- Rebuilt for Python 3.8
e619c10
7d92f34
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.2-4
7d92f34
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
7d92f34
3dad1a4
* Wed Feb 27 2019 Yatin Karel <ykarel@redhat.com> - 1.5.2-3
3dad1a4
- Disable python2 build in Fedora and EL > 7
3dad1a4
e42afd0
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.2-2
e42afd0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
e42afd0
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.