]>
Commit | Line | Data |
---|---|---|
de7dec5d JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without python2 # CPython 2.x module | |
4 | %bcond_without python3 # CPython 3.x module | |
5 | ||
6 | Summary: py.test plugin to capture log messages | |
7 | Summary(pl.UTF-8): Wtyczka py.test do przechwytywania logowanych komunikatów | |
8 | Name: python-pytest-capturelog | |
9 | Version: 0.7 | |
a042e444 | 10 | Release: 6 |
de7dec5d JB |
11 | License: MIT |
12 | Group: Libraries/Python | |
13 | #Source0Download: https://pypi.python.org/simple/pytest-capturelog | |
14 | Source0: https://pypi.python.org/packages/source/p/pytest-capturelog/pytest-capturelog-%{version}.tar.gz | |
15 | # Source0-md5: cfeac23d8ed254deaeb50a8c0aa141e9 | |
16 | URL: https://bitbucket.org/memedough/pytest-capturelog/overview | |
17 | %if %{with python2} | |
18 | BuildRequires: python-modules >= 1:2.6 | |
19 | BuildRequires: python-setuptools | |
20 | %endif | |
21 | %if %{with python3} | |
22 | BuildRequires: python3-modules >= 1:3.3 | |
23 | BuildRequires: python3-setuptools | |
24 | %endif | |
25 | BuildRequires: rpm-pythonprov | |
26 | BuildRequires: rpmbuild(macros) >= 1.714 | |
27 | Requires: python-modules >= 1:2.6 | |
28 | BuildArch: noarch | |
29 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
30 | ||
31 | %description | |
32 | py.test plugin to capture log messages. | |
33 | ||
34 | %description -l pl.UTF-8 | |
35 | Wtyczka py.test do przechwytywania logowanych komunikatów. | |
36 | ||
37 | %package -n python3-pytest-capturelog | |
38 | Summary: py.test plugin to capture log messages | |
39 | Summary(pl.UTF-8): Wtyczka py.test do przechwytywania logowanych komunikatów | |
40 | Group: Libraries/Python | |
41 | Requires: python3-modules >= 1:3.3 | |
42 | ||
43 | %description -n python3-pytest-capturelog | |
44 | py.test plugin to capture log messages. | |
45 | ||
46 | %description -n python3-pytest-capturelog -l pl.UTF-8 | |
47 | Wtyczka py.test do przechwytywania logowanych komunikatów. | |
48 | ||
49 | %prep | |
50 | %setup -q -n pytest-capturelog-%{version} | |
51 | ||
52 | %build | |
53 | %if %{with python2} | |
54 | %py_build | |
55 | %endif | |
56 | ||
57 | %if %{with python3} | |
58 | %py3_build | |
59 | %endif | |
60 | ||
61 | %install | |
62 | rm -rf $RPM_BUILD_ROOT | |
63 | ||
64 | %if %{with python2} | |
65 | %py_install | |
66 | ||
67 | %py_postclean | |
68 | %endif | |
69 | ||
70 | %if %{with python3} | |
71 | %py3_install | |
72 | %endif | |
73 | ||
74 | %clean | |
75 | rm -rf $RPM_BUILD_ROOT | |
76 | ||
77 | %if %{with python2} | |
78 | %files | |
79 | %defattr(644,root,root,755) | |
80 | %doc README | |
81 | %{py_sitescriptdir}/pytest_capturelog.py[co] | |
82 | %{py_sitescriptdir}/pytest_capturelog-%{version}-py*.egg-info | |
83 | %endif | |
84 | ||
85 | %if %{with python3} | |
86 | %files -n python3-pytest-capturelog | |
87 | %defattr(644,root,root,755) | |
88 | %doc README | |
89 | %{py3_sitescriptdir}/pytest_capturelog.py | |
90 | %{py3_sitescriptdir}/__pycache__/pytest_capturelog.cpython-*.py[co] | |
91 | %{py3_sitescriptdir}/pytest_capturelog-%{version}-py*.egg-info | |
92 | %endif |