]> git.pld-linux.org Git - SPECS.git/blob - python-flaky.spec
SPECS updated Sat 31 Jul 20:26:02 CEST 2021
[SPECS.git] / python-flaky.spec
1 #
2 # Conditional build:
3 %bcond_with     tests   # unit tests (many failures)
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_without  python3 # CPython 3.x module
6
7 Summary:        Plugin for nose or pytest that automatically reruns flaky tests
8 Summary(pl.UTF-8):      Wtyczka dla nose lub pytesta automatycznie uruchamiająca ponownie niepewne testy
9 Name:           python-flaky
10 Version:        3.6.1
11 Release:        3
12 License:        Apache v2.0
13 Group:          Libraries/Python
14 #Source0Download: https://pypi.org/simple/flaky/
15 Source0:        https://files.pythonhosted.org/packages/source/f/flaky/flaky-%{version}.tar.gz
16 # Source0-md5:  7427c11cd74e8851f1d7bf2690b646b5
17 Patch0:         %{name}-mock.patch
18 URL:            https://pypi.org/project/flaky/
19 %if %{with python2}
20 BuildRequires:  python-modules >= 1:2.7
21 BuildRequires:  python-setuptools
22 %if %{with tests}
23 BuildRequires:  python-genty
24 BuildRequires:  python-mock
25 BuildRequires:  python-pytest
26 %endif
27 %endif
28 %if %{with python3}
29 BuildRequires:  python3-modules >= 1:3.4
30 BuildRequires:  python3-setuptools
31 %if %{with tests}
32 BuildRequires:  python3-genty
33 BuildRequires:  python3-pytest
34 %endif
35 %endif
36 BuildRequires:  rpm-pythonprov
37 BuildRequires:  rpmbuild(macros) >= 1.714
38 Requires:       python-modules >= 1:2.7
39 BuildArch:      noarch
40 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41
42 %description
43 Flaky is a plugin for nose or pytest that automatically reruns flaky
44 tests.
45
46 Ideally, tests reliably pass or fail, but sometimes test fixtures must
47 rely on components that aren't 100% reliable. With flaky, instead of
48 removing those tests or marking them to @skip, they can be
49 automatically retried.
50
51 %description -l pl.UTF-8
52 Flaky to wtyczka dla nose lub pytesta automatycznie uruchamiająca
53 ponownie niepewne testy.
54
55 Idealnie testy powinny deterministycznie powodzić się lub nie, ale
56 czasem wypozażenia testów muszą polegać na komponentach nie w pełni
57 deterministycznych. Przy pomocy modułu flaky, zamiast usuwania tych
58 testów lub oznaczania ich @skip, można je automatycznie ponowić.
59
60 %package -n python3-flaky
61 Summary:        Plugin for nose or pytest that automatically reruns flaky tests
62 Summary(pl.UTF-8):      Wtyczka dla nose lub pytesta automatycznie uruchamiająca ponownie niepewne testy
63 Group:          Libraries/Python
64 Requires:       python3-modules >= 1:3.4
65
66 %description -n python3-flaky
67 Flaky is a plugin for nose or pytest that automatically reruns flaky
68 tests.
69
70 Ideally, tests reliably pass or fail, but sometimes test fixtures must
71 rely on components that aren't 100% reliable. With flaky, instead of
72 removing those tests or marking them to @skip, they can be
73 automatically retried.
74
75 %description -n python3-flaky -l pl.UTF-8
76 Flaky to wtyczka dla nose lub pytesta automatycznie uruchamiająca
77 ponownie niepewne testy.
78
79 Idealnie testy powinny deterministycznie powodzić się lub nie, ale
80 czasem wypozażenia testów muszą polegać na komponentach nie w pełni
81 deterministycznych. Przy pomocy modułu flaky, zamiast usuwania tych
82 testów lub oznaczania ich @skip, można je automatycznie ponowić.
83
84 %prep
85 %setup -q -n flaky-%{version}
86 %patch0 -p1
87
88 %build
89 %if %{with python2}
90 %py_build
91
92 %if %{with tests}
93 LC_ALL=C.UTF-8 \
94 %{__python} -m unittest discover -s test
95 %endif
96 %endif
97
98 %if %{with python3}
99 %py3_build
100
101 %if %{with tests}
102 %{__python3} -m unittest discover -s test
103 %endif
104 %endif
105
106 %install
107 rm -rf $RPM_BUILD_ROOT
108
109 %if %{with python2}
110 %py_install
111
112 %py_postclean
113 %endif
114
115 %if %{with python3}
116 %py3_install
117 %endif
118
119 %clean
120 rm -rf $RPM_BUILD_ROOT
121
122 %if %{with python2}
123 %files
124 %defattr(644,root,root,755)
125 %doc README.rst
126 %{py_sitescriptdir}/flaky
127 %{py_sitescriptdir}/flaky-%{version}-py*.egg-info
128 %endif
129
130 %if %{with python3}
131 %files -n python3-flaky
132 %defattr(644,root,root,755)
133 %doc README.rst
134 %{py3_sitescriptdir}/flaky
135 %{py3_sitescriptdir}/flaky-%{version}-py*.egg-info
136 %endif
This page took 1.218273 seconds and 3 git commands to generate.