]> git.pld-linux.org Git - packages/python-func_timeout.git/blame - python-func_timeout.spec
rebuild with python 3.10
[packages/python-func_timeout.git] / python-func_timeout.spec
CommitLineData
0a06be20
JB
1# TODO: GootTests based tests
2#
3# Conditional build:
4%bcond_without tests # unit tests
5%bcond_without python2 # CPython 2.x module
6%bcond_without python3 # CPython 3.x module
7
8Summary: Python module to support running any existing function with a given timeout
9Summary(pl.UTF-8): Moduł Pythona pozwalający uruchamiać istniejące funkcje z podanym limitem czasu
10Name: python-func_timeout
11Version: 4.3.5
9a3f1aa8 12Release: 3
0a06be20
JB
13License: LGPL v3
14Group: Libraries/Python
15#Source0Download: https://pypi.org/simple/func-timeout/
16Source0: https://files.pythonhosted.org/packages/source/f/func-timeout/func_timeout-%{version}.tar.gz
17# Source0-md5: 3535d4e00d54e36757ba7c65f20e4c91
18URL: https://pypi.org/project/func-timeout/
19%if %{with python2}
20BuildRequires: python-modules >= 1:2.7
21BuildRequires: python-setuptools
22%if %{with tests}
23#BuildRequires: python-GoodTests
24%endif
25%endif
26%if %{with python3}
27BuildRequires: python3-modules >= 1:3.4
28BuildRequires: python3-setuptools
29%if %{with tests}
30#BuildRequires: python3-GoodTests
31%endif
32%endif
33BuildRequires: rpm-pythonprov
34BuildRequires: rpmbuild(macros) >= 1.714
35Requires: python-modules >= 1:2.7
36BuildArch: noarch
37BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39%description
40Python module which allows you to specify timeouts when calling any
41existing function. Also provides support for stoppable-threads.
42
43%description -l pl.UTF-8
44Moduł Pythona pozwalający na określenie limitów czasu przy wywoływaniu
45dowolnej istniejącej funkcji. Obsługuje także zatrzymywanie wątków.
46
47%package -n python3-func_timeout
48Summary: Python module to support running any existing function with a given timeout
49Summary(pl.UTF-8): Moduł Pythona pozwalający uruchamiać istniejące funkcje z podanym limitem czasu
50Group: Libraries/Python
51Requires: python3-modules >= 1:3.4
52
53%description -n python3-func_timeout
54Python module which allows you to specify timeouts when calling any
55existing function. Also provides support for stoppable-threads.
56
57%description -n python3-func_timeout -l pl.UTF-8
58Moduł Pythona pozwalający na określenie limitów czasu przy wywoływaniu
59dowolnej istniejącej funkcji. Obsługuje także zatrzymywanie wątków.
60
61%package apidocs
62Summary: API documentation for Python func_timeout module
63Summary(pl.UTF-8): Dokumentacja API modułu Pythona func_timeout
64Group: Documentation
65
66%description apidocs
67API documentation for Python func_timeout module.
68
69%description apidocs -l pl.UTF-8
70Dokumentacja API modułu Pythona func_timeout.
71
72%prep
73%setup -q -n func_timeout-%{version}
74
75%build
76%if %{with python2}
77%py_build
78
79%if %{with tests}
80%{__python} testit.py
81#%{__python} tests/runTests.py
82%endif
83%endif
84
85%if %{with python3}
86%py3_build
87
88%if %{with tests}
89%{__python3} testit.py
90#%{__python3} tests/runTests.py
91%endif
92%endif
93
94%install
95rm -rf $RPM_BUILD_ROOT
96
97%if %{with python2}
98%py_install
99
100%py_postclean
101%endif
102
103%if %{with python3}
104%py3_install
105
106%{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/func_timeout/py2_raise.py
107%endif
108
109%clean
110rm -rf $RPM_BUILD_ROOT
111
112%if %{with python2}
113%files
114%defattr(644,root,root,755)
115%doc ChangeLog LICENSE README.md
116%{py_sitescriptdir}/func_timeout
117%{py_sitescriptdir}/func_timeout-%{version}-py*.egg-info
118%endif
119
120%if %{with python3}
121%files -n python3-func_timeout
122%defattr(644,root,root,755)
123%doc ChangeLog LICENSE README.md
124%{py3_sitescriptdir}/func_timeout
125%{py3_sitescriptdir}/func_timeout-%{version}-py*.egg-info
126%endif
127
128%files apidocs
129%defattr(644,root,root,755)
130%doc doc/*.html
This page took 0.102243 seconds and 4 git commands to generate.