]> git.pld-linux.org Git - packages/python-pytest-sugar.git/blame - python-pytest-sugar.spec
rebuild with tests and docs
[packages/python-pytest-sugar.git] / python-pytest-sugar.spec
CommitLineData
91dd6ea3
JB
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
7Summary: pytest plugin changing default look and feel of pytest
8Summary(pl.UTF-8): Wtyczka pytesta zmieniająca domyślny wygląd i zachowanie
9Name: python-pytest-sugar
10Version: 0.9.4
b70b1485 11Release: 4
91dd6ea3
JB
12License: BSD
13Group: Libraries/Python
14#Source0Download: https://pypi.org/simple/pytest-sugar/
15Source0: https://files.pythonhosted.org/packages/source/p/pytest-sugar/pytest-sugar-%{version}.tar.gz
16# Source0-md5: 34d13e153527aff4442212465b3f2f89
17URL: https://pypi.org/project/pytest-sugar/
18%if %{with python2}
19BuildRequires: python-modules >= 1:2.7
20BuildRequires: python-setuptools
21%if %{with tests}
22BuildRequires: python-packaging >= 14.1
23BuildRequires: python-pytest >= 2.9
24BuildRequires: python-termcolor >= 1.1.0
25%endif
26%endif
27%if %{with python3}
28BuildRequires: python3-modules >= 1:3.4
29BuildRequires: python3-setuptools
30%if %{with tests}
31BuildRequires: python3-packaging >= 14.1
32BuildRequires: python3-pytest >= 2.9
33BuildRequires: python3-pytest-xdist
34BuildRequires: python3-termcolor >= 1.1.0
35%endif
36%endif
37BuildRequires: rpm-pythonprov
38BuildRequires: rpmbuild(macros) >= 1.714
39Requires: python-modules >= 1:2.7
40BuildArch: noarch
41BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42
43%description
44pytest-sugar is a plugin for pytest that changes the default look and
45feel of pytest (e.g. progressbar, show tests that fail instantly).
46
47%description -l pl.UTF-8
48pytest-sugar to wtyczka pytesta zmieniająca domyślny wygląd i
49zachowanie pytesta (m.in. pasek postępu, natychmiastowe pokazywanie
50testów zakończonych niepowodzeniem).
51
52%package -n python3-pytest-sugar
53Summary: pytest plugin changing default look and feel of pytest
54Summary(pl.UTF-8): Wtyczka pytesta zmieniająca domyślny wygląd i zachowanie
55Group: Libraries/Python
56Requires: python3-modules >= 1:3.4
57
58%description -n python3-pytest-sugar
59pytest-sugar is a plugin for pytest that changes the default look and
60feel of pytest (e.g. progressbar, show tests that fail instantly).
61
62%description -n python3-pytest-sugar -l pl.UTF-8
63pytest-sugar to wtyczka pytesta zmieniająca domyślny wygląd i
64zachowanie pytesta (m.in. pasek postępu, natychmiastowe pokazywanie
65testów zakończonych niepowodzeniem).
66
67%prep
68%setup -q -n pytest-sugar-%{version}
69
70%build
71%if %{with python2}
72%py_build
73
74%if %{with tests}
75PYTHONPATH=$(pwd) \
76PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
77PYTEST_PLUGINS="pytest_sugar" \
78%{__python} -m pytest test_sugar.py -k 'not test_xdist and not test_xdist_verbose'
79%endif
80%endif
81
82%if %{with python3}
83%py3_build
84
85%if %{with tests}
86PYTHONPATH=$(pwd) \
87PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
88PYTEST_PLUGINS="pytest_sugar,xdist.plugin" \
89%{__python3} -m pytest test_sugar.py
90%endif
91%endif
92
93%install
94rm -rf $RPM_BUILD_ROOT
95
96%if %{with python2}
97%py_install
98
99%py_postclean
100%endif
101
102%if %{with python3}
103%py3_install
104%endif
105
106%clean
107rm -rf $RPM_BUILD_ROOT
108
109%if %{with python2}
110%files
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
115%endif
116
117%if %{with python3}
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
124%endif
This page took 0.174654 seconds and 4 git commands to generate.