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