]> git.pld-linux.org Git - packages/python-requests-mock.git/blame - python-requests-mock.spec
use predictable pythonhosted url
[packages/python-requests-mock.git] / python-requests-mock.spec
CommitLineData
969fefd6 1#
969fefd6
JK
2# Conditional build:
3%bcond_with tests # do not perform "make test"
4%bcond_without python2 # CPython 2.x module
5%bcond_without python3 # CPython 3.x module
6
969fefd6
JK
7%define module requests_mock
8%define egg_name %{module}
9%define pypi_name requests-mock
10Summary: Mock out responses from the requests package
11Name: python-%{pypi_name}
12Version: 1.3.0
233cb9ed 13Release: 2
969fefd6
JK
14License: Apache
15Group: Libraries/Python
e14f920d 16Source0: https://files.pythonhosted.org/packages/source/r/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
969fefd6
JK
17# Source0-md5: d2efbaf16d19153b7d271628071b4d4b
18URL: https://requests-mock.readthedocs.io
19BuildRequires: rpm-pythonprov
20BuildRequires: rpmbuild(macros) >= 1.714
21%if %{with python2}
22BuildRequires: python-modules
0e3e6bf4 23BuildRequires: python-pbr
969fefd6
JK
24BuildRequires: python-setuptools
25%endif
26%if %{with python3}
27BuildRequires: python3-modules
0e3e6bf4 28BuildRequires: python3-pbr
969fefd6
JK
29BuildRequires: python3-setuptools
30%endif
31Requires: python-requests
32BuildArch: noarch
33BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35%description
36requests-mock provides a building block to stub out the HTTP requests
37portions of your testing code.
38
233cb9ed 39%package -n python3-%{pypi_name}
969fefd6
JK
40Summary: Mock out responses from the requests package
41Group: Libraries/Python
42Requires: python3-modules
43
233cb9ed 44%description -n python3-%{pypi_name}
969fefd6
JK
45requests-mock provides a building block to stub out the HTTP requests
46portions of your testing code.
47
48%prep
49%setup -q -n %{pypi_name}-%{version}
50
51%build
52%if %{with python2}
53%py_build %{?with_tests:test}
54%endif
55
56%if %{with python3}
57%py3_build %{?with_tests:test}
58%endif
59
60%install
61rm -rf $RPM_BUILD_ROOT
62
63%if %{with python2}
64%py_install
65
66%py_postclean
67%endif
68
69%if %{with python3}
70%py3_install
71%endif
72
73%clean
74rm -rf $RPM_BUILD_ROOT
75
76%if %{with python2}
77%files
78%defattr(644,root,root,755)
79%doc AUTHORS ChangeLog README.rst *.txt
80%{py_sitescriptdir}/%{module}
81%{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
82%endif
83
84%if %{with python3}
233cb9ed 85%files -n python3-%{pypi_name}
969fefd6
JK
86%defattr(644,root,root,755)
87%doc AUTHORS ChangeLog README.rst *.txt
88%{py3_sitescriptdir}/%{module}
89%{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
90%endif
This page took 0.050355 seconds and 4 git commands to generate.