]> git.pld-linux.org Git - packages/python-betamax.git/blame - python-betamax.spec
rebuild with python 3.10
[packages/python-betamax.git] / python-betamax.spec
CommitLineData
f2fc5f74
JB
1#
2# Conditional build:
3%bcond_without doc # Sphinx documentation
4%bcond_with tests # unit tests (6 failing as of 0.8.1)
5%bcond_without python2 # CPython 2.x module
6%bcond_without python3 # CPython 3.x module
7
8Summary: VCR imitation for python-requests
9Summary(pl.UTF-8): Imitacja VCR dla python-requests
10Name: python-betamax
11Version: 0.8.1
8bc4f375 12Release: 2
f2fc5f74
JB
13License: Apache v2.0
14Group: Libraries/Python
15#Source0Download: https://pypi.org/simple/betamax/
16Source0: https://files.pythonhosted.org/packages/source/b/betamax/betamax-%{version}.tar.gz
17# Source0-md5: b8182d43a200fc126a3bf7555626f964
18URL: https://pypi.org/project/betamax/
19%if %{with python2}
20BuildRequires: python-modules >= 1:2.7
21BuildRequires: python-setuptools
22%if %{with tests}
23BuildRequires: python-pytest
24%endif
25%endif
26%if %{with python3}
27BuildRequires: python3-modules >= 1:3.3
28BuildRequires: python3-setuptools
29%if %{with tests}
30BuildRequires: python3-pytest
31%endif
32%endif
33BuildRequires: rpm-pythonprov
34BuildRequires: rpmbuild(macros) >= 1.714
35%if %{with doc}
36BuildRequires: sphinx-pdg
37%endif
38Requires: python-modules >= 1:2.7
39BuildArch: noarch
40BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41
42%description
43Betamax is a VCR imitation for requests. This will make mocking out
44requests much easier.
45
46%description -l pl.UTF-8
47Betamax to imitacja magnetowidu dla żądań HTTP (pakietu requests).
48Znacząco ułatwia to podstawianie atrap dla requests.
49
50%package -n python3-betamax
51Summary: VCR imitation for python-requests
52Summary(pl.UTF-8): Imitacja VCR dla python-requests
53Group: Libraries/Python
54Requires: python3-modules >= 1:3.3
55
56%description -n python3-betamax
57Betamax is a VCR imitation for requests. This will make mocking out
58requests much easier.
59
60%description -n python3-betamax -l pl.UTF-8
61Betamax to imitacja magnetowidu dla żądań HTTP (pakietu requests).
62Znacząco ułatwia to podstawianie atrap dla requests.
63
64%package apidocs
65Summary: API documentation for Python betamax module
66Summary(pl.UTF-8): Dokumentacja API modułu Pythona betamax
67Group: Documentation
68
69%description apidocs
70API documentation for Python betamax module.
71
72%description apidocs -l pl.UTF-8
73Dokumentacja API modułu Pythona betamax.
74
75%prep
76%setup -q -n betamax-%{version}
77
78%build
79%if %{with python2}
80%py_build
81
82%if %{with tests}
83PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
84PYTEST_PLUGINS="betamax.fixtures.pytest" \
85%{__python} -m pytest tests
86%endif
87%endif
88
89%if %{with python3}
90%py3_build
91
92%if %{with tests}
93PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
94PYTEST_PLUGINS="betamax.fixtures.pytest" \
95%{__python3} -m pytest tests
96%endif
97%endif
98
99%if %{with doc}
100%{__make} -C docs html
101%endif
102
103%install
104rm -rf $RPM_BUILD_ROOT
105
106%if %{with python2}
107%py_install
108
109%py_postclean
110%endif
111
112%if %{with python3}
113%py3_install
114%endif
115
116%clean
117rm -rf $RPM_BUILD_ROOT
118
119%if %{with python2}
120%files
121%defattr(644,root,root,755)
122%doc AUTHORS.rst HISTORY.rst LICENSE README.rst
123%{py_sitescriptdir}/betamax
124%{py_sitescriptdir}/betamax-%{version}-py*.egg-info
125%endif
126
127%if %{with python3}
128%files -n python3-betamax
129%defattr(644,root,root,755)
130%doc AUTHORS.rst HISTORY.rst LICENSE README.rst
131%{py3_sitescriptdir}/betamax
132%{py3_sitescriptdir}/betamax-%{version}-py*.egg-info
133%endif
134
135%if %{with doc}
136%files apidocs
137%defattr(644,root,root,755)
138%doc docs/_build/html/{_static,*.html,*.js}
139%endif
This page took 0.089515 seconds and 4 git commands to generate.