3 %bcond_without tests # unit tests
4 %bcond_without python2 # CPython 2.x module
5 %bcond_without python3 # CPython 3.x module
7 Summary: pytest plugin changing default look and feel of pytest
8 Summary(pl.UTF-8): Wtyczka pytesta zmieniająca domyślny wygląd i zachowanie
9 Name: python-pytest-sugar
13 Group: Libraries/Python
14 #Source0Download: https://pypi.org/simple/pytest-sugar/
15 Source0: https://files.pythonhosted.org/packages/source/p/pytest-sugar/pytest-sugar-%{version}.tar.gz
16 # Source0-md5: 34d13e153527aff4442212465b3f2f89
17 URL: https://pypi.org/project/pytest-sugar/
19 BuildRequires: python-modules >= 1:2.7
20 BuildRequires: python-setuptools
22 BuildRequires: python-packaging >= 14.1
23 BuildRequires: python-pytest >= 2.9
24 BuildRequires: python-termcolor >= 1.1.0
28 BuildRequires: python3-modules >= 1:3.4
29 BuildRequires: python3-setuptools
31 BuildRequires: python3-packaging >= 14.1
32 BuildRequires: python3-pytest >= 2.9
33 BuildRequires: python3-pytest-xdist
34 BuildRequires: python3-termcolor >= 1.1.0
37 BuildRequires: rpm-pythonprov
38 BuildRequires: rpmbuild(macros) >= 1.714
39 Requires: python-modules >= 1:2.7
41 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44 pytest-sugar is a plugin for pytest that changes the default look and
45 feel of pytest (e.g. progressbar, show tests that fail instantly).
47 %description -l pl.UTF-8
48 pytest-sugar to wtyczka pytesta zmieniająca domyślny wygląd i
49 zachowanie pytesta (m.in. pasek postępu, natychmiastowe pokazywanie
50 testów zakończonych niepowodzeniem).
52 %package -n python3-pytest-sugar
53 Summary: pytest plugin changing default look and feel of pytest
54 Summary(pl.UTF-8): Wtyczka pytesta zmieniająca domyślny wygląd i zachowanie
55 Group: Libraries/Python
56 Requires: python3-modules >= 1:3.4
58 %description -n python3-pytest-sugar
59 pytest-sugar is a plugin for pytest that changes the default look and
60 feel of pytest (e.g. progressbar, show tests that fail instantly).
62 %description -n python3-pytest-sugar -l pl.UTF-8
63 pytest-sugar to wtyczka pytesta zmieniająca domyślny wygląd i
64 zachowanie pytesta (m.in. pasek postępu, natychmiastowe pokazywanie
65 testów zakończonych niepowodzeniem).
68 %setup -q -n pytest-sugar-%{version}
76 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
77 PYTEST_PLUGINS="pytest_sugar" \
78 %{__python} -m pytest test_sugar.py -k 'not test_xdist and not test_xdist_verbose'
87 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
88 PYTEST_PLUGINS="pytest_sugar,xdist.plugin" \
89 %{__python3} -m pytest test_sugar.py
94 rm -rf $RPM_BUILD_ROOT
107 rm -rf $RPM_BUILD_ROOT
111 %defattr(644,root,root,755)
112 %doc CHANGES.rst CONTRIBUTORS.rst LICENSE README.md
113 %{py_sitescriptdir}/pytest_sugar.py[co]
114 %{py_sitescriptdir}/pytest_sugar-%{version}-py*.egg-info
118 %files -n python3-pytest-sugar
119 %defattr(644,root,root,755)
120 %doc CHANGES.rst CONTRIBUTORS.rst LICENSE README.md
121 %{py3_sitescriptdir}/pytest_sugar.py
122 %{py3_sitescriptdir}/__pycache__/pytest_sugar.cpython-*.py[co]
123 %{py3_sitescriptdir}/pytest_sugar-%{version}-py*.egg-info