f759a6b
# Created by pyp2rpm-3.3.0
f759a6b
%global pypi_name httmock
f759a6b
f759a6b
Name:           python-%{pypi_name}
f759a6b
Version:        1.2.6
f759a6b
Release:        1%{?dist}
f759a6b
Summary:        A mocking library for requests
f759a6b
f759a6b
License:        ASL 2.0
f759a6b
URL:            https://github.com/patrys/httmock
f759a6b
Source0:        https://files.pythonhosted.org/packages/source/h/httmock/httmock-%{version}.tar.gz
f759a6b
Source1:        https://raw.githubusercontent.com/patrys/httmock/%{version}/tests.py
f759a6b
BuildArch:      noarch
f759a6b
 
f759a6b
BuildRequires:  python2-devel
f759a6b
BuildRequires:  python2dist(requests) >= 1.0.0
f759a6b
BuildRequires:  python2dist(setuptools)
f759a6b
 
f759a6b
BuildRequires:  python3-devel
f759a6b
BuildRequires:  python3dist(requests) >= 1.0.0
f759a6b
BuildRequires:  python3dist(setuptools)
f759a6b
f759a6b
%description
f759a6b
A mocking library for requests for Python.
f759a6b
You can use it to mock third-party APIs and test libraries 
f759a6b
that use requests internally. 
f759a6b
f759a6b
%package -n     python2-%{pypi_name}
f759a6b
Summary:        %{summary}
f759a6b
%{?python_provide:%python_provide python2-%{pypi_name}}
f759a6b
 
f759a6b
Requires:       python2dist(requests) >= 1.0.0
f759a6b
%description -n python2-%{pypi_name}
f759a6b
A mocking library for requests for Python.
f759a6b
You can use it to mock third-party APIs and test libraries 
f759a6b
that use requests internally. 
f759a6b
f759a6b
%package -n     python3-%{pypi_name}
f759a6b
Summary:        %{summary}
f759a6b
%{?python_provide:%python_provide python3-%{pypi_name}}
f759a6b
 
f759a6b
Requires:       python3dist(requests) >= 1.0.0
f759a6b
%description -n python3-%{pypi_name}
f759a6b
A mocking library for requests for Python.
f759a6b
You can use it to mock third-party APIs and test libraries 
f759a6b
that use requests internally. 
f759a6b
f759a6b
%prep
f759a6b
%autosetup -n %{pypi_name}-%{version}
f759a6b
# Remove bundled egg-info
f759a6b
rm -rf %{pypi_name}.egg-info
f759a6b
cp %{SOURCE1} .
f759a6b
f759a6b
%build
f759a6b
%py2_build
f759a6b
%py3_build
f759a6b
f759a6b
%install
f759a6b
# Must do the default python version install last because
f759a6b
# the scripts in /usr/bin are overwritten with every setup.py install.
f759a6b
%py2_install
f759a6b
%py3_install
f759a6b
f759a6b
%check
f759a6b
%{__python2} setup.py test
f759a6b
%{__python3} setup.py test
f759a6b
f759a6b
%files -n python2-%{pypi_name}
f759a6b
%license LICENSE
f759a6b
%doc README.md
f759a6b
%{python2_sitelib}/%{pypi_name}.py*
f759a6b
%{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
f759a6b
f759a6b
%files -n python3-%{pypi_name}
f759a6b
%license LICENSE
f759a6b
%doc README.md
f759a6b
%{python3_sitelib}/__pycache__/*
f759a6b
%{python3_sitelib}/%{pypi_name}.py
f759a6b
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
f759a6b
f759a6b
%changelog
f759a6b
* Fri May 11 2018 Steve Traylen <steve.traylen@cern.ch> - 1.2.6-1
f759a6b
- Initial package.