]> git.pld-linux.org Git - packages/python3-outcome.git/blob - python3-outcome.spec
46671adede10bc72096cd04d2d0b3200339742eb
[packages/python3-outcome.git] / python3-outcome.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # Sphinx documentation
4 %bcond_without  tests   # unit tests
5
6 Summary:        Capture the outcome of Python function calls
7 Summary(pl.UTF-8):      Przechwytywanie wyników wywołań funkcji pythonowych
8 Name:           python3-outcome
9 Version:        1.1.0
10 Release:        2
11 License:        MIT or Apache v2.0
12 Group:          Libraries/Python
13 #Source0Download: https://pypi.org/simple/outcome/
14 Source0:        https://files.pythonhosted.org/packages/source/o/outcome/outcome-%{version}.tar.gz
15 # Source0-md5:  30184431b681fe2d5460a2344b904aba
16 URL:            https://pypi.org/project/outcome/
17 BuildRequires:  python3-modules >= 1:3.6
18 BuildRequires:  python3-setuptools
19 %if %{with tests}
20 BuildRequires:  python3-attrs >= 19.2.0
21 BuildRequires:  python3-pytest
22 BuildRequires:  python3-pytest-asyncio
23 %endif
24 BuildRequires:  rpm-pythonprov
25 BuildRequires:  rpmbuild(macros) >= 1.714
26 %if %{with doc}
27 BuildRequires:  python3-sphinx_rtd_theme
28 BuildRequires:  python3-sphinxcontrib-trio
29 BuildRequires:  sphinx-pdg-3
30 %endif
31 Requires:       python3-modules >= 1:3.6
32 BuildArch:      noarch
33 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35 %description
36 Capture the outcome of Python function calls.
37
38 %description -l pl.UTF-8
39 Przechwytywanie wyników wywołań funkcji pythonowych.
40
41 %package apidocs
42 Summary:        API documentation for Python outcome module
43 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona outcome
44 Group:          Documentation
45
46 %description apidocs
47 API documentation for Python outcome module.
48
49 %description apidocs -l pl.UTF-8
50 Dokumentacja API modułu Pythona outcome.
51
52 %prep
53 %setup -q -n outcome-%{version}
54
55 %build
56 %py3_build
57
58 %if %{with tests}
59 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
60 PYTEST_PLUGINS="pytest_asyncio.plugin" \
61 PYTHONPATH=$(pwd)/src \
62 %{__python3} -m pytest tests
63 %endif
64
65 %if %{with doc}
66 PYTHONPATH=$(pwd)/src \
67 %{__make} -C docs html \
68         SPHINXBUILD=sphinx-build-3
69 %endif
70
71 %install
72 rm -rf $RPM_BUILD_ROOT
73
74 %py3_install
75
76 %clean
77 rm -rf $RPM_BUILD_ROOT
78
79 %files
80 %defattr(644,root,root,755)
81 %doc LICENSE LICENSE.MIT README.rst
82 %{py3_sitescriptdir}/outcome
83 %{py3_sitescriptdir}/outcome-%{version}-py*.egg-info
84
85 %if %{with doc}
86 %files apidocs
87 %defattr(644,root,root,755)
88 %doc docs/build/html/{_static,*.html,*.js}
89 %endif
This page took 0.059653 seconds and 2 git commands to generate.