]> git.pld-linux.org Git - packages/python3-pytest-rerunfailures.git/blob - python-pytest-rerunfailures.spec
df688368373f946b82760a945b95ff7b8eb9a17e
[packages/python3-pytest-rerunfailures.git] / python-pytest-rerunfailures.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:        pytest plugin to re-run tests to eliminate flaky failures
8 Summary(pl.UTF-8):      Wtyczka pytesta do ponownego uruchamiania testów w celu wyeliminowania chwilowych niepowodzeń
9 Name:           python-pytest-rerunfailures
10 # NOTE:
11 # 7.0 for pytest 3.10 through 4.3 (python 2.7, 3.4+)
12 # 8.0 for pytest 4.4 through 5.2 (python 2.7, 3.5+)
13 # 9.x for pytest 5 through 6.1 (python 3.5+ only)
14 Version:        7.0
15 Release:        1
16 License:        MPL v2.0
17 Group:          Libraries/Python
18 #Source0Download: https://pypi.org/simple/pytest-rerunfailures/
19 Source0:        https://files.pythonhosted.org/packages/source/p/pytest-rerunfailures/pytest-rerunfailures-%{version}.tar.gz
20 # Source0-md5:  898c15d1c99f85d9c48005dd380fa3fe
21 URL:            https://pypi.org/project/pytest-rerunfailures/
22 %if %{with python2}
23 BuildRequires:  python-modules >= 1:2.7
24 BuildRequires:  python-setuptools
25 %if %{with tests}
26 BuildRequires:  python-pytest >= 3.10
27 %endif
28 %endif
29 %if %{with python3}
30 BuildRequires:  python3-modules >= 1:3.4
31 BuildRequires:  python3-setuptools
32 %if %{with tests}
33 BuildRequires:  python3-pytest >= 3.10
34 BuildRequires:  python3-pytest < 5
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 pytest-rerunfailures is a plugin for py.test that re-runs tests to
45 eliminate intermittent failures.
46
47 %description -l pl.UTF-8
48 pytest-rerunfailures to wtyczka modułu py.test uruchamiająca ponownie
49 testy, aby wyeliminować chwilowe niepowodzenia.
50
51 %package -n python3-pytest-rerunfailures
52 Summary:        pytest plugin to re-run tests to eliminate flaky failures
53 Summary(pl.UTF-8):      Wtyczka pytesta do ponownego uruchamiania testów w celu wyeliminowania chwilowych niepowodzeń
54 Group:          Libraries/Python
55 Requires:       python3-modules >= 1:3.4
56
57 %description -n python3-pytest-rerunfailures
58 pytest-rerunfailures is a plugin for py.test that re-runs tests to
59 eliminate intermittent failures.
60
61 %description -n python3-pytest-rerunfailures -l pl.UTF-8
62 pytest-rerunfailures to wtyczka modułu py.test uruchamiająca ponownie
63 testy, aby wyeliminować chwilowe niepowodzenia.
64
65 %prep
66 %setup -q -n pytest-rerunfailures-%{version}
67
68 %build
69 %if %{with python2}
70 %py_build
71
72 %if %{with tests}
73 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
74 PYTEST_PLUGINS="pytest_rerunfailures" \
75 %{__python} -m pytest test_pytest_rerunfailures.py
76 %endif
77 %endif
78
79 %if %{with python3}
80 %py3_build
81
82 %if %{with tests}
83 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
84 PYTEST_PLUGINS="pytest_rerunfailures" \
85 %{__python3} -m pytest test_pytest_rerunfailures.py
86 %endif
87 %endif
88
89 %install
90 rm -rf $RPM_BUILD_ROOT
91
92 %if %{with python2}
93 %py_install
94
95 %py_postclean
96 %endif
97
98 %if %{with python3}
99 %py3_install
100 %endif
101
102 %clean
103 rm -rf $RPM_BUILD_ROOT
104
105 %if %{with python2}
106 %files
107 %defattr(644,root,root,755)
108 %doc CHANGES.rst LICENSE README.rst
109 %{py_sitescriptdir}/pytest_rerunfailures.py[co]
110 %{py_sitescriptdir}/pytest_rerunfailures-%{version}-py*.egg-info
111 %endif
112
113 %if %{with python3}
114 %files -n python3-pytest-rerunfailures
115 %defattr(644,root,root,755)
116 %doc CHANGES.rst LICENSE README.rst
117 %{py3_sitescriptdir}/pytest_rerunfailures.py
118 %{py3_sitescriptdir}/__pycache__/pytest_rerunfailures.cpython-*.py[co]
119 %{py3_sitescriptdir}/pytest_rerunfailures-%{version}-py*.egg-info
120 %endif
This page took 0.10856 seconds and 2 git commands to generate.