]> git.pld-linux.org Git - packages/python-pytest-cov.git/blob - python-pytest-cov.spec
25e17d31f2fab2ef3e24ac752e8e7d4b90922711
[packages/python-pytest-cov.git] / python-pytest-cov.spec
1 #
2 # Conditional build:
3 %bcond_without  doc             # Sphinx documentation
4 %bcond_with     tests           # py.test tests [sensitive to coverage and pytest output, hang for me]
5 %bcond_with     tests_py2       # Python 2 py.test tests [require some modules sources + the above]
6 %bcond_without  python2          # CPython 2.x module
7 %bcond_without  python3          # CPython 3.x module
8
9 Summary:        pytest plugin for measuring coverage
10 Summary(pl.UTF-8):      Wtyczka pytest do mierzenia pokrycia
11 Name:           python-pytest-cov
12 Version:        2.4.0
13 Release:        2
14 License:        MIT
15 Group:          Libraries/Python
16 #Source0Download: https://pypi.python.org/simple/pytest-cov
17 Source0:        https://files.pythonhosted.org/packages/source/p/pytest-cov/pytest-cov-%{version}.tar.gz
18 # Source0-md5:  2fda09677d232acc99ec1b3c5831e33f
19 URL:            https://github.com/pytest-dev/pytest-cov
20 %if %{with python2}
21 BuildRequires:  python-modules >= 1:2.6
22 BuildRequires:  python-setuptools
23 %if %{with tests_py2}
24 BuildRequires:  python-coverage >= 3.7.1
25 BuildRequires:  python-helper
26 BuildRequires:  python-process_tests >= 1.2.0
27 BuildRequires:  python-pytest >= 2.6.0
28 BuildRequires:  python-pytest-catchlog
29 BuildRequires:  python-pytest-xdist >= 1.15.0
30 BuildRequires:  python-virtualenv
31 %endif
32 %endif
33 %if %{with python3}
34 BuildRequires:  python3-modules >= 1:3.3
35 BuildRequires:  python3-setuptools
36 %if %{with tests}
37 BuildRequires:  python3-coverage >= 3.7.1
38 BuildRequires:  python3-helper
39 BuildRequires:  python3-process_tests >= 1.2.0
40 BuildRequires:  python3-pytest >= 2.6.0
41 BuildRequires:  python3-pytest-catchlog
42 BuildRequires:  python3-pytest-xdist >= 1.15.0
43 BuildRequires:  python3-virtualenv
44 %endif
45 %endif
46 BuildRequires:  rpm-pythonprov
47 BuildRequires:  rpmbuild(macros) >= 1.714
48 %if %{with doc}
49 BuildRequires:  sphinx-pdg
50 BuildRequires:  python3-sphinx_py3doc_enhanced_theme
51 %endif
52 Requires:       python-modules >= 1:2.6
53 BuildArch:      noarch
54 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
55
56 %description
57 This plugin produces coverage reports. It supports centralised testing
58 and distributed testing in both load and each modes. It also supports
59 coverage of subprocesses.
60
61 %description -l pl.UTF-8
62 Ta wtyczka tworzy raporty pokrycia. Obsługuje testowanie
63 zcentraliwowane i rozproszone, zarówno w trybie "load", jak i "each".
64 Obsługuje także pokrycie podprocesów.
65
66 %package -n python3-pytest-cov
67 Summary:        pytest plugin for measuring coverage
68 Summary(pl.UTF-8):      Wtyczka pytest do mierzenia pokrycia
69 Group:          Libraries/Python
70 Requires:       python3-modules >= 1:3.3
71
72 %description -n python3-pytest-cov
73 This plugin produces coverage reports. It supports centralised testing
74 and distributed testing in both load and each modes. It also supports
75 coverage of subprocesses.
76
77 %description -n python3-pytest-cov -l pl.UTF-8
78 Ta wtyczka tworzy raporty pokrycia. Obsługuje testowanie
79 zcentraliwowane i rozproszone, zarówno w trybie "load", jak i "each".
80 Obsługuje także pokrycie podprocesów.
81
82 %package apidocs
83 Summary:        Documentation for pytest-cov module
84 Summary(pl.UTF-8):      Dokumentacja do modułu pytest-cov
85 Group:          Documentation
86
87 %description apidocs
88 Documentation for pytest-cov module.
89
90 %description apidocs -l pl.UTF-8
91 Dokumentacja do modułu pytest-cov.
92
93 %prep
94 %setup -q -n pytest-cov-%{version}
95
96 %build
97 %if %{with python2}
98 %py_build
99
100 %if %{with tests_py2}
101 PYTHONPATH=$(pwd)/build-2/lib PYTEST_PLUGINS=pytest_cov.plugin %{__python} -m pytest
102 %endif
103 %endif
104
105 %if %{with python3}
106 %py3_build
107
108 %if %{with tests}
109 PYTHONPATH=$(pwd)/build-3/lib PYTEST_PLUGINS=pytest_cov.plugin %{__python3} -m pytest
110 %endif
111 %endif
112
113 %if %{with doc}
114 cd docs
115 sphinx-build -b html . _build/html
116 %endif
117
118 %install
119 rm -rf $RPM_BUILD_ROOT
120
121 %if %{with python2}
122 %py_install
123
124 %py_postclean
125 %endif
126
127 %if %{with python3}
128 %py3_install
129 %endif
130
131 %clean
132 rm -rf $RPM_BUILD_ROOT
133
134 %if %{with python2}
135 %files
136 %defattr(644,root,root,755)
137 %doc AUTHORS.rst CHANGELOG.rst LICENSE README.rst
138 %{py_sitescriptdir}/pytest-cov.pth
139 %{py_sitescriptdir}/pytest_cov
140 %{py_sitescriptdir}/pytest_cov-%{version}-py*.egg-info
141 %endif
142
143 %if %{with python3}
144 %files -n python3-pytest-cov
145 %defattr(644,root,root,755)
146 %doc AUTHORS.rst CHANGELOG.rst LICENSE README.rst
147 %{py3_sitescriptdir}/pytest-cov.pth
148 %{py3_sitescriptdir}/pytest_cov
149 %{py3_sitescriptdir}/pytest_cov-%{version}-py*.egg-info
150 %endif
151
152 %if %{with doc}
153 %files apidocs
154 %defattr(644,root,root,755)
155 %doc docs/_build/html/{_static,*.html,*.js}
156 %endif
This page took 0.078598 seconds and 2 git commands to generate.