]> git.pld-linux.org Git - packages/python-pytest-timeout.git/blame - python-pytest-timeout.spec
- release 2 (by relup.sh)
[packages/python-pytest-timeout.git] / python-pytest-timeout.spec
CommitLineData
16a57b48 1#
44e10bda 2# Conditional build:
d2e171a5 3%bcond_with tests # py.test tests [use ptys, so not on builders]
44e10bda
MK
4%bcond_without python2 # CPython 2.x module
5%bcond_without python3 # CPython 3.x module
6
44e10bda 7%define module pytest-timeout
beeea2d2
JB
8Summary: py.test plugin to abort hanging tests
9Summary(pl.UTF-8): Wtyczka py.test do przerywania zawieszonych testów
44e10bda 10Name: python-%{module}
beeea2d2 11Version: 1.2.0
ce8e622a 12Release: 2
44e10bda
MK
13License: MIT
14Group: Libraries/Python
beeea2d2
JB
15Source0: https://pypi.python.org/packages/cc/b7/b2a61365ea6b6d2e8881360ae7ed8dad0327ad2df89f2f0be4a02304deb2/pytest-timeout-%{version}.tar.gz
16# Source0-md5: 83607d91aa163562c7ee835da57d061d
44e10bda 17URL: http://bitbucket.org/pytest-dev/pytest-timeout/
44e10bda 18%if %{with python2}
beeea2d2 19BuildRequires: python-modules >= 1:2.6
481c2014 20BuildRequires: python-setuptools
beeea2d2
JB
21%if %{with tests}
22BuildRequires: python-pexpect
23BuildRequires: python-pytest >= 2.8.0
24%endif
44e10bda
MK
25%endif
26%if %{with python3}
beeea2d2 27BuildRequires: python3-modules >= 1:3.3
481c2014 28BuildRequires: python3-setuptools
beeea2d2
JB
29%if %{with tests}
30BuildRequires: python3-pexpect
31BuildRequires: python3-pytest >= 2.8.0
32%endif
44e10bda 33%endif
beeea2d2
JB
34BuildRequires: rpm-pythonprov
35BuildRequires: rpmbuild(macros) >= 1.714
36Requires: python-modules >= 1:2.6
44e10bda
MK
37BuildArch: noarch
38BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
40%description
beeea2d2
JB
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.
44e10bda
MK
45
46%description -l pl.UTF-8
beeea2d2
JB
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ą.
44e10bda
MK
51
52%package -n python3-%{module}
beeea2d2
JB
53Summary: py.test plugin to abort hanging tests
54Summary(pl.UTF-8): Wtyczka py.test do przerywania zawieszonych testów
44e10bda 55Group: Libraries/Python
beeea2d2 56Requires: python3-modules >= 1:3.3
44e10bda
MK
57
58%description -n python3-%{module}
beeea2d2
JB
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.
44e10bda
MK
63
64%description -n python3-%{module} -l pl.UTF-8
beeea2d2
JB
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ą.
44e10bda
MK
69
70%prep
71%setup -q -n %{module}-%{version}
72
73%build
74%if %{with python2}
beeea2d2
JB
75%py_build
76
77%{?with_tests:PYTHONPATH=$(pwd) %{__python} -m pytest}
44e10bda
MK
78%endif
79
80%if %{with python3}
beeea2d2 81%py3_build
44e10bda 82
beeea2d2 83%{?with_tests:PYTHONPATH=$(pwd) %{__python3} -m pytest}
44e10bda
MK
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)
beeea2d2 104%doc LICENSE README
16a57b48 105%{py_sitescriptdir}/pytest_timeout.py[co]
44e10bda
MK
106%{py_sitescriptdir}/pytest_timeout-%{version}-py*.egg-info
107%endif
44e10bda
MK
108
109%if %{with python3}
110%files -n python3-%{module}
111%defattr(644,root,root,755)
beeea2d2 112%doc LICENSE README
44e10bda 113%{py3_sitescriptdir}/pytest_timeout.py
beeea2d2 114%{py3_sitescriptdir}/__pycache__/pytest_timeout.cpython-*.py[co]
44e10bda
MK
115%{py3_sitescriptdir}/pytest_timeout-%{version}-py*.egg-info
116%endif
This page took 0.101689 seconds and 4 git commands to generate.