]> git.pld-linux.org Git - packages/python-pytest-timeout.git/blob - python-pytest-timeout.spec
Initial version 1.0.0.
[packages/python-pytest-timeout.git] / python-pytest-timeout.spec
1 # Conditional build:
2 # %%bcond_without       doc     # don't build doc
3 %bcond_without  tests   # do not perform "make test"
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_without  python3 # CPython 3.x module
6
7 # NOTE: 'module' should match the python import path, not the egg name
8 %define         module  pytest-timeout
9 Summary:        Pytest plugin which will terminate tests after a certain timeout
10 Summary(pl.UTF-8):      Wtyczka Pytest wymuszająca zakończenie testów po przekroczeniu limitu czasu
11 # Name must match the python module/package name (as on pypi or in 'import' statement)
12 Name:           python-%{module}
13 Version:        1.0.0
14 Release:        1
15 License:        MIT
16 Group:          Libraries/Python
17 Source0:        https://pypi.python.org/packages/cf/92/ab29b9baa54d47dfd50e43be35577de9af4e7ebf27d29f546ddeb6c3b6f5/pytest-timeout-%{version}.tar.gz
18 # Source0-md5:  f9f162bd079689980b5614673ddfdae4
19 URL:            http://bitbucket.org/pytest-dev/pytest-timeout/
20 BuildRequires:  rpm-pythonprov
21 BuildRequires:  rpmbuild(macros) >= 1.714
22 %if %{with python2}
23 BuildRequires:  python-modules
24 BuildRequires:  python-pytest
25 %endif
26 %if %{with python3}
27 BuildRequires:  python3-modules
28 BuildRequires:  python3-pytest
29 %endif
30 Requires:       python-modules
31 BuildArch:      noarch
32 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34 %description
35 Pytest plugin which will terminate tests after a certain timeout When
36 doing so it will show a stack dump of all threads running at the time.
37
38 %description -l pl.UTF-8
39 Wtyczka Pytest wymuszająca zakończenie testów po przekroczeniu limitu
40 czasu Przy przekroczeniu pokaże zrzut stosu wszystkich wątków
41 biegnących w tym czasie
42
43 %package -n python3-%{module}
44 Summary:        Pytest plugin which will terminate tests after a certain timeout
45 Summary(pl.UTF-8):      Wtyczka Pytest wymuszająca zakończenie testów po przekroczeniu limitu czasu
46 Group:          Libraries/Python
47 Requires:       python3-modules
48
49 %description -n python3-%{module}
50 Pytest plugin which will terminate tests after a certain timeout When
51 doing so it will show a stack dump of all threads running at the time.
52
53 %description -n python3-%{module} -l pl.UTF-8
54 Wtyczka Pytest wymuszająca zakończenie testów po przekroczeniu limitu
55 czasu Przy przekroczeniu pokaże zrzut stosu wszystkich wątków
56 biegnących w tym czasie
57
58 %package apidocs
59 Summary:        %{module} API documentation
60 Summary(pl.UTF-8):      Dokumentacja API %{module}
61 Group:          Documentation
62
63 %description apidocs
64 API documentation for %{module}.
65
66 %description apidocs -l pl.UTF-8
67 Dokumentacja API %{module}.
68
69 %prep
70 %setup -q -n %{module}-%{version}
71
72 %build
73 %if %{with python2}
74 %py_build %{?with_tests:test}
75 %endif
76
77 %if %{with python3}
78 %py3_build %{?with_tests:test}
79 %endif
80
81 %if %{with doc}
82 cd docs
83 %{__make} -j1 html
84 rm -rf _build/html/_sources
85 %endif
86
87 %install
88 rm -rf $RPM_BUILD_ROOT
89
90 %if %{with python2}
91 %py_install
92 %py_postclean
93 %endif
94
95 %if %{with python3}
96 %py3_install
97 %endif
98
99 %clean
100 rm -rf $RPM_BUILD_ROOT
101
102 %if %{with python2}
103 %files
104 %defattr(644,root,root,755)
105 %doc README
106 %{py_sitescriptdir}/pytest_timeout.py*
107 %if "%{py_ver}" > "2.4"
108 %{py_sitescriptdir}/pytest_timeout-%{version}-py*.egg-info
109 %endif
110 %endif
111
112 %if %{with python3}
113 %files -n python3-%{module}
114 %defattr(644,root,root,755)
115 %doc README
116 %{py3_sitescriptdir}/pytest_timeout.py
117 %{py3_sitescriptdir}/__pycache__/pytest_timeout.*.pyc
118 %{py3_sitescriptdir}/pytest_timeout-%{version}-py*.egg-info
119 %endif
120
121 %if %{with doc}
122 %files apidocs
123 %defattr(644,root,root,755)
124 %doc docs/_build/html/*
125 %endif
This page took 0.031341 seconds and 3 git commands to generate.