]> git.pld-linux.org Git - packages/python-pytest-timeout.git/blame_incremental - python-pytest-timeout.spec
rebuild with tests and docs
[packages/python-pytest-timeout.git] / python-pytest-timeout.spec
... / ...
CommitLineData
1#
2# Conditional build:
3%bcond_with tests # py.test tests [use ptys, so not on builders]
4%bcond_without python2 # CPython 2.x module
5%bcond_without python3 # CPython 3.x module
6
7%define module pytest-timeout
8Summary: py.test plugin to abort hanging tests
9Summary(pl.UTF-8): Wtyczka py.test do przerywania zawieszonych testów
10Name: python-%{module}
11Version: 1.2.0
12Release: 2
13License: MIT
14Group: Libraries/Python
15Source0: https://pypi.python.org/packages/cc/b7/b2a61365ea6b6d2e8881360ae7ed8dad0327ad2df89f2f0be4a02304deb2/pytest-timeout-%{version}.tar.gz
16# Source0-md5: 83607d91aa163562c7ee835da57d061d
17URL: http://bitbucket.org/pytest-dev/pytest-timeout/
18%if %{with python2}
19BuildRequires: python-modules >= 1:2.6
20BuildRequires: python-setuptools
21%if %{with tests}
22BuildRequires: python-pexpect
23BuildRequires: python-pytest >= 2.8.0
24%endif
25%endif
26%if %{with python3}
27BuildRequires: python3-modules >= 1:3.3
28BuildRequires: python3-setuptools
29%if %{with tests}
30BuildRequires: python3-pexpect
31BuildRequires: python3-pytest >= 2.8.0
32%endif
33%endif
34BuildRequires: rpm-pythonprov
35BuildRequires: rpmbuild(macros) >= 1.714
36Requires: python-modules >= 1:2.6
37BuildArch: noarch
38BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
40%description
41This is a plugin which will terminate tests after a certain timeout.
42When doing so it will show a stack dump of all threads running at the
43time. This is useful when running tests under a continuous integration
44server or simply if you don't know why the test suite hangs.
45
46%description -l pl.UTF-8
47Ta wtyczka przerywa testy po upłynięciu określonego limitu czasu. Przy
48tym pokazuje zrzut stosu wszystkich wątków działających w tej chwili.
49Jest to przydatne przy uruchamianiu testów na serwerze ciągłej
50integracji lub jeśli nie wiemy, dlaczego testy się zawieszają.
51
52%package -n python3-%{module}
53Summary: py.test plugin to abort hanging tests
54Summary(pl.UTF-8): Wtyczka py.test do przerywania zawieszonych testów
55Group: Libraries/Python
56Requires: python3-modules >= 1:3.3
57
58%description -n python3-%{module}
59This is a plugin which will terminate tests after a certain timeout.
60When doing so it will show a stack dump of all threads running at the
61time. This is useful when running tests under a continuous integration
62server or simply if you don't know why the test suite hangs.
63
64%description -n python3-%{module} -l pl.UTF-8
65Ta wtyczka przerywa testy po upłynięciu określonego limitu czasu. Przy
66tym pokazuje zrzut stosu wszystkich wątków działających w tej chwili.
67Jest to przydatne przy uruchamianiu testów na serwerze ciągłej
68integracji lub jeśli nie wiemy, dlaczego testy się zawieszają.
69
70%prep
71%setup -q -n %{module}-%{version}
72
73%build
74%if %{with python2}
75%py_build
76
77%{?with_tests:PYTHONPATH=$(pwd) %{__python} -m pytest}
78%endif
79
80%if %{with python3}
81%py3_build
82
83%{?with_tests:PYTHONPATH=$(pwd) %{__python3} -m pytest}
84%endif
85
86%install
87rm -rf $RPM_BUILD_ROOT
88
89%if %{with python2}
90%py_install
91%py_postclean
92%endif
93
94%if %{with python3}
95%py3_install
96%endif
97
98%clean
99rm -rf $RPM_BUILD_ROOT
100
101%if %{with python2}
102%files
103%defattr(644,root,root,755)
104%doc LICENSE README
105%{py_sitescriptdir}/pytest_timeout.py[co]
106%{py_sitescriptdir}/pytest_timeout-%{version}-py*.egg-info
107%endif
108
109%if %{with python3}
110%files -n python3-%{module}
111%defattr(644,root,root,755)
112%doc LICENSE README
113%{py3_sitescriptdir}/pytest_timeout.py
114%{py3_sitescriptdir}/__pycache__/pytest_timeout.cpython-*.py[co]
115%{py3_sitescriptdir}/pytest_timeout-%{version}-py*.egg-info
116%endif
This page took 0.056412 seconds and 4 git commands to generate.