]> git.pld-linux.org Git - packages/python3-pytest-trio.git/blob - python3-pytest-trio.spec
- new
[packages/python3-pytest-trio.git] / python3-pytest-trio.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # API documentation
4 %bcond_without  tests   # unit tests
5
6 Summary:        Pytest plugin for trio
7 Summary(pl.UTF-8):      Wtyczka pytesta do trio
8 Name:           python3-pytest-trio
9 Version:        0.7.0
10 Release:        1
11 License:        MIT or Apache v2.0
12 Group:          Libraries/Python
13 #Source0Download: https://pypi.org/simple/pytest-trio/
14 Source0:        https://files.pythonhosted.org/packages/source/p/pytest-trio/pytest-trio-%{version}.tar.gz
15 # Source0-md5:  7325029271277e8ee70f0534e4618677
16 URL:            https://pypi.org/project/pytest-trio/
17 BuildRequires:  python3-modules >= 1:3.6
18 BuildRequires:  python3-setuptools
19 %if %{with tests}
20 BuildRequires:  python3-async_generator >= 1.9
21 BuildRequires:  python3-hypothesis >= 3.64
22 BuildRequires:  python3-outcome
23 BuildRequires:  python3-pytest >= 6.0.0
24 BuildRequires:  python3-pytest-cov
25 BuildRequires:  python3-trio >= 0.15.0
26 %endif
27 BuildRequires:  rpm-pythonprov
28 BuildRequires:  rpmbuild(macros) >= 1.714
29 %if %{with doc}
30 BuildRequires:  python3-sphinx_rtd_theme
31 BuildRequires:  python3-sphinxcontrib-trio
32 BuildRequires:  sphinx-pdg-3
33 %endif
34 Requires:       python3-modules >= 1:3.6
35 BuildArch:      noarch
36 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38 %description
39 This is a pytest plugin to help you test projects that use Trio, a
40 friendly library for concurrency and async I/O in Python.
41
42 %description -l pl.UTF-8
43 Ten pakiet zawiera wtyczkę pytesta, pomagającą testować projekty
44 wykorzystujące Trio - przyjazną bibliotekę Pythona do współbieżności i
45 asynchronicznego we/wy.
46
47 %package apidocs
48 Summary:        API documentation for Python pytest-trio module
49 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona pytest-trio
50 Group:          Documentation
51
52 %description apidocs
53 API documentation for Python pytest-trio module.
54
55 %description apidocs -l pl.UTF-8
56 Dokumentacja API modułu Pythona pytest-trio.
57
58 %prep
59 %setup -q -n pytest-trio-%{version}
60
61 # relies on trio tests sources installed
62 %{__rm} pytest_trio/_tests/test_hypothesis_interaction.py
63
64 %build
65 %py3_build
66
67 %if %{with tests}
68 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
69 PYTEST_PLUGINS="pytest_trio.plugin" \
70 PYTHONPATH=$(pwd) \
71 %{__python3} -m pytest pytest_trio/_tests
72 %endif
73
74 %if %{with doc}
75 %{__make} -C docs html \
76         SPHINXBUILD=sphinx-build-3
77 %endif
78
79 %install
80 rm -rf $RPM_BUILD_ROOT
81
82 %py3_install
83
84 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/pytest_trio/_tests
85
86 %clean
87 rm -rf $RPM_BUILD_ROOT
88
89 %files
90 %defattr(644,root,root,755)
91 %doc LICENSE LICENSE.MIT README.rst
92 %{py3_sitescriptdir}/pytest_trio
93 %{py3_sitescriptdir}/pytest_trio-%{version}-py*.egg-info
94
95 %if %{with doc}
96 %files apidocs
97 %defattr(644,root,root,755)
98 %doc docs/build/html/{_static,*.html,*.js}
99 %endif
This page took 0.060679 seconds and 3 git commands to generate.