3 %bcond_with tests # unit tests (some fail on python2)
4 %bcond_without python2 # CPython 2.x module
5 %bcond_without python3 # CPython 3.x module
7 Summary: Coloured output for nosetests
8 Summary(pl.UTF-8): Kolorowe wyjście z testów nose
13 Group: Libraries/Python
14 #Source0Download: https://pypi.org/simple/rednose/
15 Source0: https://files.pythonhosted.org/packages/source/r/rednose/rednose-%{version}.tar.gz
16 # Source0-md5: 11f9d74f6a7241093afa6529f2c2f282
17 Patch0: %{name}-colorama.patch
18 URL: https://pypi.org/project/rednose/
20 BuildRequires: python-modules >= 1:2.7
21 BuildRequires: python-setuptools
23 BuildRequires: python-nose
24 BuildRequires: python-six >= 1.10.0
25 BuildRequires: python-termstyle >= 0.1.7
29 BuildRequires: python3-modules >= 1:3.4
30 BuildRequires: python3-setuptools
32 BuildRequires: python3-nose
33 BuildRequires: python3-six >= 1.10.0
34 BuildRequires: python3-termstyle >= 0.1.7
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 rednose is a nosetests plugin for adding colour (and readability) to
45 nosetest console results.
47 %description -l pl.UTF-8
48 rednose to wtyczka testów nose dodająca kolorowanie (i czytelność) do
49 wyników testów na konsoli.
51 %package -n python3-rednose
52 Summary: Coloured output for nosetests
53 Summary(pl.UTF-8): Kolorowe wyjście z testów nose
54 Group: Libraries/Python
55 Requires: python3-modules >= 1:3.4
57 %description -n python3-rednose
58 rednose is a nosetests plugin for adding colour (and readability) to
59 nosetest console results.
61 %description -n python3-rednose -l pl.UTF-8
62 rednose to wtyczka testów nose dodająca kolorowanie (i czytelność) do
63 wyników testów na konsoli.
66 %setup -q -n rednose-%{version}
71 %py_build %{?with_tests:test}
75 %py3_build %{?with_tests:test}
79 rm -rf $RPM_BUILD_ROOT
84 %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/test_files
91 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/test_files
95 rm -rf $RPM_BUILD_ROOT
99 %defattr(644,root,root,755)
100 %doc LICENCE readme.rst
101 %{py_sitescriptdir}/rednose.py[co]
102 %{py_sitescriptdir}/rednose-%{version}-py*.egg-info
106 %files -n python3-rednose
107 %defattr(644,root,root,755)
108 %doc LICENCE readme.rst
109 %{py3_sitescriptdir}/rednose.py
110 %{py3_sitescriptdir}/__pycache__/rednose.cpython-*.py[co]
111 %{py3_sitescriptdir}/rednose-%{version}-py*.egg-info