python-httmock/python-httmock.spec
2020-12-17 16:49:56 +08:00

58 lines
1.5 KiB
RPMSpec

%{?python_enable_dependency_generator}
# Created by pyp2rpm-3.3.0
%global pypi_name httmock
Name: python-%{pypi_name}
Version: 1.3.0
Release: 1
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
%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}}
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3dist(requests) >= 1
%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
* Thu Dec 17 2020 jiangxinyu <jiangxinyu@kylinos.cn> - 1.3.0-1
- Init httmock project