]> git.pld-linux.org Git - packages/python-responses.git/blame - python-responses.spec
- test BRs fixed
[packages/python-responses.git] / python-responses.spec
CommitLineData
5b20e6b4
ER
1#
2# Conditional build:
0e5595bc 3%bcond_without tests # unit tests
5b20e6b4
ER
4%bcond_without python2 # CPython 2.x module
5%bcond_without python3 # CPython 3.x module
6
7%define module responses
5b20e6b4 8Summary: A utility for mocking out the Python Requests library
0e5595bc 9Summary(pl.UTF-8): Narzędzie do podstawiania atrap biblioteki Python Requests
6a52c6f7
JB
10Name: python-%{module}
11# keep 0.17.x here for python2 support
12Version: 0.17.0
13Release: 1
5b20e6b4 14License: Apache v2.0
6a52c6f7 15Group: Libraries/Python
0e5595bc 16#Source0Download: https://github.com/getsentry/responses/releases
6a52c6f7
JB
17Source0: https://github.com/getsentry/responses/archive/%{version}/%{module}-%{version}.tar.gz
18# Source0-md5: 7b94ef2851112c11c3bf75455e4ebeff
0e5595bc 19Patch0: %{name}-py2.patch
5b20e6b4
ER
20URL: https://github.com/getsentry/responses
21BuildRequires: rpm-pythonprov
22BuildRequires: rpmbuild(macros) >= 1.714
23%if %{with python2}
0e5595bc 24BuildRequires: python-modules >= 1:2.7
5b20e6b4 25BuildRequires: python-setuptools
5b20e6b4
ER
26%if %{with tests}
27BuildRequires: python-cookies
0e5595bc 28BuildRequires: python-coverage >= 3.7.1
5b20e6b4
ER
29BuildRequires: python-flake8
30BuildRequires: python-mock
0e5595bc 31BuildRequires: python-pytest >= 4.6
5b20e6b4 32BuildRequires: python-pytest-cov
0e5595bc
JB
33BuildRequires: python-pytest-localserver
34BuildRequires: python-requests >= 2.0
35BuildRequires: python-urllib3 >= 1.25.10
5b20e6b4
ER
36BuildRequires: python-six
37%endif
38%endif
39%if %{with python3}
0e5595bc 40BuildRequires: python3-modules >= 1:3.5
5b20e6b4
ER
41BuildRequires: python3-setuptools
42%if %{with tests}
0e5595bc 43BuildRequires: python3-coverage >= 3.7.1
5b20e6b4 44BuildRequires: python3-flake8
0e5595bc 45BuildRequires: python3-pytest >= 4.6
5b20e6b4 46BuildRequires: python3-pytest-cov
0e5595bc
JB
47BuildRequires: python3-pytest-localserver
48BuildRequires: python3-requests >= 2.0
49BuildRequires: python3-urllib3 >= 1.25.10
5b20e6b4
ER
50BuildRequires: python3-six
51%endif
52%endif
53BuildArch: noarch
54BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
55
56%description
57A utility library for mocking out the requests Python library.
58
0e5595bc
JB
59%description -l pl.UTF-8
60Biblioteka narzędziowa do podstawiania atrap biblioteki Pythona
61requests.
62
6a52c6f7 63%package -n python3-%{module}
5b20e6b4 64Summary: A utility for mocking out the Python Requests library
0e5595bc 65Summary(pl.UTF-8): Narzędzie do podstawiania atrap biblioteki Python Requests
5b20e6b4
ER
66Group: Libraries/Python
67
6a52c6f7 68%description -n python3-%{module}
5b20e6b4
ER
69A utility library for mocking out the requests Python library.
70
6a52c6f7 71%description -n python3-%{module} -l pl.UTF-8
0e5595bc
JB
72Biblioteka narzędziowa do podstawiania atrap biblioteki Pythona
73requests.
74
5b20e6b4 75%prep
6a52c6f7 76%setup -q -n %{module}-%{version}
0e5595bc 77%patch0 -p1
5b20e6b4
ER
78
79%build
80%if %{with python2}
0e5595bc
JB
81%py_build
82
83%if %{with tests}
84PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
85PYTEST_PLUGINS="pytest_localserver.plugin" \
6a52c6f7 86%{__python} -m pytest responses
0e5595bc 87%endif
5b20e6b4
ER
88%endif
89
90%if %{with python3}
0e5595bc
JB
91%py3_build
92
93%if %{with tests}
94PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
95PYTEST_PLUGINS="pytest_localserver.plugin" \
6a52c6f7 96%{__python3} -m pytest responses
0e5595bc 97%endif
5b20e6b4
ER
98%endif
99
100%install
101rm -rf $RPM_BUILD_ROOT
0e5595bc 102
5b20e6b4
ER
103%if %{with python2}
104%py_install
0e5595bc 105
5b20e6b4 106%py_postclean
5b20e6b4
ER
107%endif
108
109%if %{with python3}
110%py3_install
5b20e6b4
ER
111%endif
112
113%clean
114rm -rf $RPM_BUILD_ROOT
115
116%if %{with python2}
117%files
118%defattr(644,root,root,755)
0e5595bc 119%doc CHANGES README.rst
6a52c6f7
JB
120%{py_sitescriptdir}/responses
121%{py_sitescriptdir}/responses-%{version}-py*.egg-info
5b20e6b4
ER
122%endif
123
124%if %{with python3}
6a52c6f7 125%files -n python3-%{module}
5b20e6b4 126%defattr(644,root,root,755)
0e5595bc 127%doc CHANGES README.rst
6a52c6f7
JB
128%{py3_sitescriptdir}/responses
129%{py3_sitescriptdir}/responses-%{version}-py*.egg-info
5b20e6b4 130%endif
This page took 0.075937 seconds and 4 git commands to generate.