3 %bcond_without doc # Sphinx documentation
4 %bcond_without tests # unit tests
5 %bcond_without python2 # CPython 2.x module
6 %bcond_without python3 # CPython 3.x module
8 Summary: Capture the outcome of Python function calls
9 Summary(pl.UTF-8): Przechwytywanie wyników wywołań funkcji pythonowych
11 # keep 1.0.x here for python2 support
14 License: MIT or Apache v2.0
15 Group: Libraries/Python
16 #Source0Download: https://pypi.org/simple/outcome/
17 Source0: https://files.pythonhosted.org/packages/source/o/outcome/outcome-%{version}.tar.gz
18 # Source0-md5: 17e511c2bd1ee3cdd7a1aad29fe0133b
19 URL: https://pypi.org/project/outcome/
21 BuildRequires: python-modules >= 1:2.7
22 BuildRequires: python-setuptools
24 BuildRequires: python-attrs >= 19.2.0
25 BuildRequires: python-pytest
29 BuildRequires: python3-modules >= 1:3.5
30 BuildRequires: python3-setuptools
32 BuildRequires: python3-async_generator
33 BuildRequires: python3-attrs >= 19.2.0
34 BuildRequires: python3-pytest
35 BuildRequires: python3-pytest-asyncio
38 BuildRequires: rpm-pythonprov
39 BuildRequires: rpmbuild(macros) >= 1.714
41 BuildRequires: python3-sphinx_rtd_theme
42 BuildRequires: python3-sphinxcontrib-trio
43 BuildRequires: sphinx-pdg-3
45 Requires: python-modules >= 1:2.7
47 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50 Capture the outcome of Python function calls.
52 %description -l pl.UTF-8
53 Przechwytywanie wyników wywołań funkcji pythonowych.
55 %package -n python3-outcome
56 Summary: Capture the outcome of Python function calls
57 Summary(pl.UTF-8): Przechwytywanie wyników wywołań funkcji pythonowych
58 Group: Libraries/Python
59 Requires: python3-modules >= 1:3.5
61 %description -n python3-outcome
62 Capture the outcome of Python function calls.
64 %description -n python3-outcome -l pl.UTF-8
65 Przechwytywanie wyników wywołań funkcji pythonowych.
68 Summary: API documentation for Python outcome module
69 Summary(pl.UTF-8): Dokumentacja API modułu Pythona outcome
73 API documentation for Python outcome module.
75 %description apidocs -l pl.UTF-8
76 Dokumentacja API modułu Pythona outcome.
79 %setup -q -n outcome-%{version}
86 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
88 PYTHONPATH=$(pwd)/src \
89 %{__python} -m pytest tests
97 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
98 PYTEST_PLUGINS="pytest_asyncio.plugin" \
99 PYTHONPATH=$(pwd)/src \
100 %{__python3} -m pytest tests
105 PYTHONPATH=$(pwd)/src \
106 %{__make} -C docs html \
107 SPHINXBUILD=sphinx-build-3
111 rm -rf $RPM_BUILD_ROOT
124 rm -rf $RPM_BUILD_ROOT
128 %defattr(644,root,root,755)
129 %doc LICENSE LICENSE.MIT README.rst
130 %{py_sitescriptdir}/outcome
131 %{py_sitescriptdir}/outcome-%{version}-py*.egg-info
135 %files -n python3-outcome
136 %defattr(644,root,root,755)
137 %doc LICENSE LICENSE.MIT README.rst
138 %{py3_sitescriptdir}/outcome
139 %{py3_sitescriptdir}/outcome-%{version}-py*.egg-info
144 %defattr(644,root,root,755)
145 %doc docs/build/html/{_static,*.html,*.js}