]> git.pld-linux.org Git - SPECS.git/blob - python-pytest-forked.spec
SPECS updated Tue 30 Apr 15:06:09 CEST 2024
[SPECS.git] / python-pytest-forked.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # unit tests
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_without  python3 # CPython 3.x module
6
7 Summary:        Run each test in a forked subprocess
8 Summary(pl.UTF-8):      Uruchamianie każdego testu w oddzielnym procesie
9 Name:           python-pytest-forked
10 # keep 1.3.x here for python2 support
11 Version:        1.3.0
12 Release:        3
13 License:        MIT
14 Group:          Libraries/Python
15 #Source0Download: https://pypi.org/simple/pytest-forked/
16 Source0:        https://files.pythonhosted.org/packages/source/p/pytest-forked/pytest-forked-%{version}.tar.gz
17 # Source0-md5:  7de04c46b48ca5c5a24e45bf1546355f
18 URL:            https://github.com/pytest-dev/pytest-forked
19 %if %{with python2}
20 BuildRequires:  python-modules >= 1:2.7
21 BuildRequires:  python-setuptools >= 1:41.4
22 BuildRequires:  python-setuptools_scm >= 3.3
23 %if %{with tests}
24 BuildRequires:  python-py
25 BuildRequires:  python-pytest >= 3.10
26 %endif
27 %endif
28 %if %{with python3}
29 BuildRequires:  python3-modules >= 1:3.5
30 BuildRequires:  python3-setuptools >= 1:41.4
31 BuildRequires:  python3-setuptools_scm >= 3.3
32 %if %{with tests}
33 BuildRequires:  python3-py
34 BuildRequires:  python3-pytest >= 3.10
35 %endif
36 %endif
37 BuildRequires:  rpm-pythonprov
38 BuildRequires:  rpmbuild(macros) >= 1.714
39 Requires:       python-modules >= 1:2.7
40 BuildArch:      noarch
41 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42
43 %description
44 Run each test in a forked subprocess.
45
46 %description -l pl.UTF-8
47 Uruchamianie każdego testu w oddzielnym procesie.
48
49 %package -n python3-pytest-forked
50 Summary:        Run each test in a forked subprocess
51 Summary(pl.UTF-8):      Uruchamianie każdego testu w oddzielnym procesie
52 Group:          Libraries/Python
53 Requires:       python3-modules >= 1:3.5
54
55 %description -n python3-pytest-forked
56 Run each test in a forked subprocess.
57
58 %description -n python3-pytest-forked -l pl.UTF-8
59 Uruchamianie każdego testu w oddzielnym procesie.
60
61 %prep
62 %setup -q -n pytest-forked-%{version}
63
64 %build
65 %if %{with python2}
66 %py_build
67
68 %if %{with tests}
69 # pytest-flaky plugin breaks test_functional_boxed_capturing;
70 # test_xfail relies on plugin autoloading, so can't PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
71 PYTHONPATH=$(pwd)/src \
72 %{__python} -m pytest -p no:flaky testing
73 %endif
74 %endif
75
76 %if %{with python3}
77 %py3_build
78
79 %if %{with tests}
80 PYTHONPATH=$(pwd)/src \
81 %{__python3} -m pytest -p no:flaky testing
82 %endif
83 %endif
84
85 %install
86 rm -rf $RPM_BUILD_ROOT
87
88 %if %{with python2}
89 %py_install
90
91 %py_postclean
92 %endif
93
94 %if %{with python3}
95 %py3_install
96 %endif
97
98 %clean
99 rm -rf $RPM_BUILD_ROOT
100
101 %if %{with python2}
102 %files
103 %defattr(644,root,root,755)
104 %doc CHANGELOG LICENSE README.rst example/boxed.txt
105 %{py_sitescriptdir}/pytest_forked
106 %{py_sitescriptdir}/pytest_forked-%{version}-py*.egg-info
107 %endif
108
109 %if %{with python3}
110 %files -n python3-pytest-forked
111 %defattr(644,root,root,755)
112 %doc CHANGELOG LICENSE README.rst example/boxed.txt
113 %{py3_sitescriptdir}/pytest_forked
114 %{py3_sitescriptdir}/pytest_forked-%{version}-py*.egg-info
115 %endif
This page took 0.161223 seconds and 3 git commands to generate.