]> git.pld-linux.org Git - packages/python-rednose.git/blob - python-rednose.spec
5d2df55bc3e81e99262132e09b4d64dcbba669dc
[packages/python-rednose.git] / python-rednose.spec
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
7 Summary:        Coloured output for nosetests
8 Summary(pl.UTF-8):      Kolorowe wyjście z testów nose
9 Name:           python-rednose
10 Version:        1.3.0
11 Release:        3
12 License:        MIT
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/
19 %if %{with python2}
20 BuildRequires:  python-modules >= 1:2.7
21 BuildRequires:  python-setuptools
22 %if %{with tests}
23 BuildRequires:  python-nose
24 BuildRequires:  python-six >= 1.10.0
25 BuildRequires:  python-termstyle >= 0.1.7
26 %endif
27 %endif
28 %if %{with python3}
29 BuildRequires:  python3-modules >= 1:3.4
30 BuildRequires:  python3-setuptools
31 %if %{with tests}
32 BuildRequires:  python3-nose
33 BuildRequires:  python3-six >= 1.10.0
34 BuildRequires:  python3-termstyle >= 0.1.7
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 rednose is a nosetests plugin for adding colour (and readability) to
45 nosetest console results.
46
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.
50
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
56
57 %description -n python3-rednose
58 rednose is a nosetests plugin for adding colour (and readability) to
59 nosetest console results.
60
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.
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
79 rm -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
95 rm -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.062292 seconds and 2 git commands to generate.