# Created by pyp2rpm-3.3.0
%global pypi_name httmock
Name: python-%{pypi_name}
Version: 1.2.6
Release: 4%{?dist}
Summary: A mocking library for requests
License: ASL 2.0
URL: https://github.com/patrys/httmock
Source0: https://files.pythonhosted.org/packages/source/h/httmock/httmock-%{version}.tar.gz
Source1: https://raw.githubusercontent.com/patrys/httmock/%{version}/tests.py
BuildArch: noarch
BuildRequires: python3-devel
BuildRequires: python3dist(requests) >= 1.0.0
BuildRequires: python3dist(setuptools)
%description
A mocking library for requests for Python.
You can use it to mock third-party APIs and test libraries
that use requests internally.
%package -n python3-%{pypi_name}
Summary: %{summary}
%{?python_provide:%python_provide python3-%{pypi_name}}
Requires: python3dist(requests) >= 1.0.0
%description -n python3-%{pypi_name}
A mocking library for requests for Python.
You can use it to mock third-party APIs and test libraries
that use requests internally.
%prep
%autosetup -n %{pypi_name}-%{version}
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info
cp %{SOURCE1} .
%build
%py3_build
%install
%py3_install
%check
%{__python3} setup.py test
%files -n python3-%{pypi_name}
%license LICENSE
%doc README.md
%{python3_sitelib}/__pycache__/*
%{python3_sitelib}/%{pypi_name}.py
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
%changelog
* Fri Jan 04 2019 Miro Hrončok <mhroncok@redhat.com> - 1.2.6-4
- Subpackage python2-httmock has been removed
See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.6-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 1.2.6-2
- Rebuilt for Python 3.7
* Fri May 11 2018 Steve Traylen <steve.traylen@cern.ch> - 1.2.6-1
- Initial package.