]> git.pld-linux.org Git - packages/python-rednose.git/blame - python-rednose.spec
rebuild with tests and docs
[packages/python-rednose.git] / python-rednose.spec
CommitLineData
5fd9aff3
JB
1#
2# Conditional build:
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
6
7Summary: Coloured output for nosetests
8Summary(pl.UTF-8): Kolorowe wyjście z testów nose
9Name: python-rednose
10Version: 1.3.0
cb8b3ba4 11Release: 6
5fd9aff3
JB
12License: MIT
13Group: Libraries/Python
14#Source0Download: https://pypi.org/simple/rednose/
15Source0: https://files.pythonhosted.org/packages/source/r/rednose/rednose-%{version}.tar.gz
16# Source0-md5: 11f9d74f6a7241093afa6529f2c2f282
17Patch0: %{name}-colorama.patch
18URL: https://pypi.org/project/rednose/
19%if %{with python2}
20BuildRequires: python-modules >= 1:2.7
21BuildRequires: python-setuptools
22%if %{with tests}
23BuildRequires: python-nose
24BuildRequires: python-six >= 1.10.0
25BuildRequires: python-termstyle >= 0.1.7
26%endif
27%endif
28%if %{with python3}
29BuildRequires: python3-modules >= 1:3.4
30BuildRequires: python3-setuptools
31%if %{with tests}
32BuildRequires: python3-nose
33BuildRequires: python3-six >= 1.10.0
34BuildRequires: python3-termstyle >= 0.1.7
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
44rednose is a nosetests plugin for adding colour (and readability) to
45nosetest console results.
46
47%description -l pl.UTF-8
48rednose to wtyczka testów nose dodająca kolorowanie (i czytelność) do
49wyników testów na konsoli.
50
51%package -n python3-rednose
52Summary: Coloured output for nosetests
53Summary(pl.UTF-8): Kolorowe wyjście z testów nose
54Group: Libraries/Python
55Requires: python3-modules >= 1:3.4
56
57%description -n python3-rednose
58rednose is a nosetests plugin for adding colour (and readability) to
59nosetest console results.
60
61%description -n python3-rednose -l pl.UTF-8
62rednose to wtyczka testów nose dodająca kolorowanie (i czytelność) do
63wyników testów na konsoli.
64
65%prep
66%setup -q -n rednose-%{version}
67%patch0 -p1
68
69%build
70%if %{with python2}
71%py_build %{?with_tests:test}
72%endif
73
74%if %{with python3}
75%py3_build %{?with_tests:test}
76%endif
77
78%install
79rm -rf $RPM_BUILD_ROOT
80
81%if %{with python2}
82%py_install
83
84%{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/test_files
85%py_postclean
86%endif
87
88%if %{with python3}
89%py3_install
90
91%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/test_files
92%endif
93
94%clean
95rm -rf $RPM_BUILD_ROOT
96
97%if %{with python2}
98%files
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
103%endif
104
105%if %{with python3}
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
112%endif
This page took 0.094714 seconds and 4 git commands to generate.