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