]> git.pld-linux.org Git - packages/python-requests-mock.git/blame - python-requests-mock.spec
remove template comments
[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
13Release: 1
14License: Apache
15Group: Libraries/Python
16Source0: https://pypi.python.org/packages/8d/cb/1267d7294d97e9a3ef24bf1370791da4d2dc6abc0f67626f38f4bf25dfa3/%{pypi_name}-%{version}.tar.gz
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
23BuildRequires: python-setuptools
24%endif
25%if %{with python3}
26BuildRequires: python3-modules
27BuildRequires: python3-setuptools
28%endif
29Requires: python-requests
30BuildArch: noarch
31BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33%description
34requests-mock provides a building block to stub out the HTTP requests
35portions of your testing code.
36
37%package -n python3-%{module}
38Summary: Mock out responses from the requests package
39Group: Libraries/Python
40Requires: python3-modules
41
42%description -n python3-%{module}
43requests-mock provides a building block to stub out the HTTP requests
44portions of your testing code.
45
46%prep
47%setup -q -n %{pypi_name}-%{version}
48
49%build
50%if %{with python2}
51%py_build %{?with_tests:test}
52%endif
53
54%if %{with python3}
55%py3_build %{?with_tests:test}
56%endif
57
58%install
59rm -rf $RPM_BUILD_ROOT
60
61%if %{with python2}
62%py_install
63
64%py_postclean
65%endif
66
67%if %{with python3}
68%py3_install
69%endif
70
71%clean
72rm -rf $RPM_BUILD_ROOT
73
74%if %{with python2}
75%files
76%defattr(644,root,root,755)
77%doc AUTHORS ChangeLog README.rst *.txt
78%{py_sitescriptdir}/%{module}
79%{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
80%endif
81
82%if %{with python3}
83%files -n python3-%{module}
84%defattr(644,root,root,755)
85%doc AUTHORS ChangeLog README.rst *.txt
86%{py3_sitescriptdir}/%{module}
87%{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
88%endif
This page took 0.075713 seconds and 4 git commands to generate.