]> git.pld-linux.org Git - packages/python-pytest-sugar.git/blob - python-pytest-sugar.spec
rebuild with tests and docs
[packages/python-pytest-sugar.git] / python-pytest-sugar.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 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
10 Version:        0.9.4
11 Release:        4
12 License:        BSD
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/
18 %if %{with python2}
19 BuildRequires:  python-modules >= 1:2.7
20 BuildRequires:  python-setuptools
21 %if %{with tests}
22 BuildRequires:  python-packaging >= 14.1
23 BuildRequires:  python-pytest >= 2.9
24 BuildRequires:  python-termcolor >= 1.1.0
25 %endif
26 %endif
27 %if %{with python3}
28 BuildRequires:  python3-modules >= 1:3.4
29 BuildRequires:  python3-setuptools
30 %if %{with tests}
31 BuildRequires:  python3-packaging >= 14.1
32 BuildRequires:  python3-pytest >= 2.9
33 BuildRequires:  python3-pytest-xdist
34 BuildRequires:  python3-termcolor >= 1.1.0
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-sugar is a plugin for pytest that changes the default look and
45 feel of pytest (e.g. progressbar, show tests that fail instantly).
46
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).
51
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
57
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).
61
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).
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}
75 PYTHONPATH=$(pwd) \
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'
79 %endif
80 %endif
81
82 %if %{with python3}
83 %py3_build
84
85 %if %{with tests}
86 PYTHONPATH=$(pwd) \
87 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
88 PYTEST_PLUGINS="pytest_sugar,xdist.plugin" \
89 %{__python3} -m pytest test_sugar.py
90 %endif
91 %endif
92
93 %install
94 rm -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
107 rm -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.16639 seconds and 3 git commands to generate.