f759a6b
# Created by pyp2rpm-3.3.0
f759a6b
%global pypi_name httmock
f759a6b
f759a6b
Name:           python-%{pypi_name}
f759a6b
Version:        1.2.6
3b9079c
Release:        2%{?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
8be3a0d
f759a6b
BuildRequires:  python2-devel
34eae97
BuildRequires:  python2-requests >= 1.0.0
34eae97
BuildRequires:  python2-setuptools
f759a6b
3b9079c
BuildRequires:  python%{python3_pkgversion}-devel
3b9079c
BuildRequires:  python%{python3_pkgversion}-requests >= 1.0.0
3b9079c
BuildRequires:  python%{python3_pkgversion}-setuptools
3b9079c
3b9079c
BuildRequires:  python%{python3_other_pkgversion}-devel
3b9079c
BuildRequires:  python%{python3_other_pkgversion}-requests >= 1.0.0
3b9079c
BuildRequires:  python%{python3_other_pkgversion}-setuptools
3b9079c
f759a6b
%description
f759a6b
A mocking library for requests for Python.
8be3a0d
You can use it to mock third-party APIs and test libraries
8be3a0d
that use requests internally.
f759a6b
f759a6b
%package -n     python2-%{pypi_name}
f759a6b
Summary:        %{summary}
8be3a0d
34eae97
Requires:       python2-requests >= 1.0.0
3b9079c
%{?python_provide:%python_provide python2-%{pypi_name}}
3b9079c
f759a6b
%description -n python2-%{pypi_name}
f759a6b
A mocking library for requests for Python.
8be3a0d
You can use it to mock third-party APIs and test libraries
8be3a0d
that use requests internally.
f759a6b
3b9079c
%package -n     python%{python3_pkgversion}-%{pypi_name}
3b9079c
Summary:        %{summary}
8be3a0d
3b9079c
Requires:       python%{python3_pkgversion}-requests >= 1.0.0
3b9079c
%{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi_name}}
3b9079c
%description -n python%{python3_pkgversion}-%{pypi_name}
3b9079c
A mocking library for requests for Python.
8be3a0d
You can use it to mock third-party APIs and test libraries
8be3a0d
that use requests internally.
3b9079c
3b9079c
%package -n     python%{python3_other_pkgversion}-%{pypi_name}
3b9079c
Summary:        %{summary}
8be3a0d
3b9079c
Requires:       python%{python3_other_pkgversion}-requests >= 1.0.0
3b9079c
%{?python_provide:%python_provide python%{python3_other_pkgversion}-%{pypi_name}}
3b9079c
%description -n python%{python3_other_pkgversion}-%{pypi_name}
3b9079c
A mocking library for requests for Python.
8be3a0d
You can use it to mock third-party APIs and test libraries
8be3a0d
that use requests internally.
3b9079c
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
3b9079c
%py3_build
3b9079c
%py3_other_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
3b9079c
%py3_install
3b9079c
%py3_other_install
f759a6b
f759a6b
%check
f759a6b
%{__python2} setup.py test
3b9079c
%{__python3} setup.py test
3b9079c
%{__python3_other} 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
3b9079c
%files -n python%{python3_pkgversion}-%{pypi_name}
3b9079c
%license LICENSE
3b9079c
%doc README.md
3b9079c
%{python3_sitelib}/%{pypi_name}.py*
3b9079c
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
3b9079c
%{python3_sitelib}/__pycache__/%{pypi_name}.cpython-*
3b9079c
3b9079c
%files -n python%{python3_other_pkgversion}-%{pypi_name}
3b9079c
%license LICENSE
3b9079c
%doc README.md
3b9079c
%{python3_other_sitelib}/%{pypi_name}.py*
3b9079c
%{python3_other_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
3b9079c
%{python3_other_sitelib}/__pycache__/%{pypi_name}.cpython-*
3b9079c
f759a6b
f759a6b
%changelog
3b9079c
* Wed Nov 13 2019 Steve Traylen <steve.traylen@cern.ch> - 1.2.6-2
3b9079c
- Add python3 packages to epel7
3b9079c
34eae97
* Fri May 11 2018 Steve Traylen <steve.traylen@cern.ch> - 1.2.6-1 1
34eae97
- Back port to EPEL7
34eae97
f759a6b
* Fri May 11 2018 Steve Traylen <steve.traylen@cern.ch> - 1.2.6-1
f759a6b
- Initial package.