]>
Commit | Line | Data |
---|---|---|
26c2a0e9 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # unit tests | |
4 | ||
5 | Summary: Timeout context manager for asyncio programs | |
6 | Summary(pl.UTF-8): Zarządca kontekstu z limitem czasu dla programów asyncio | |
7 | Name: python3-async_timeout | |
a92f2bc5 | 8 | Version: 4.0.2 |
c99472f0 | 9 | Release: 2 |
26c2a0e9 JB |
10 | License: Apache v2.0 |
11 | Group: Libraries/Python | |
12 | #Source0Download: https://pypi.org/simple/async-timeout/ | |
13 | Source0: https://files.pythonhosted.org/packages/source/a/async-timeout/async-timeout-%{version}.tar.gz | |
a92f2bc5 | 14 | # Source0-md5: 10571272b2e0fab839ec23f8293bf482 |
26c2a0e9 | 15 | URL: https://pypi.org/project/async-timeout/ |
a92f2bc5 JB |
16 | BuildRequires: python3-modules >= 1:3.6 |
17 | BuildRequires: python3-setuptools >= 1:45 | |
26c2a0e9 JB |
18 | %if %{with tests} |
19 | BuildRequires: python3-pytest | |
20 | BuildRequires: python3-pytest-asyncio | |
21 | BuildRequires: python3-pytest-cov | |
a92f2bc5 JB |
22 | %if "%{py3_ver}" < "3.8" |
23 | BuildRequires: python3-typing_extensions >= 3.6.5 | |
24 | %endif | |
26c2a0e9 JB |
25 | %endif |
26 | BuildRequires: rpm-pythonprov | |
27 | BuildRequires: rpmbuild(macros) >= 1.714 | |
a92f2bc5 | 28 | Requires: python3-modules >= 1:3.6 |
26c2a0e9 JB |
29 | BuildArch: noarch |
30 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
31 | ||
32 | %description | |
33 | asyncio-compatible timeout context manager. | |
34 | ||
35 | %description -l pl.UTF-8 | |
36 | Zarządca kontekstów z limitem czasu, zgodny z asyncio. | |
37 | ||
38 | %prep | |
39 | %setup -q -n async-timeout-%{version} | |
40 | ||
41 | %build | |
42 | %py3_build | |
43 | ||
44 | %if %{with tests} | |
45 | PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \ | |
46 | PYTEST_PLUGINS="pytest_asyncio.plugin,pytest_cov.plugin" \ | |
47 | %{__python3} -m pytest tests | |
48 | %endif | |
49 | ||
50 | %install | |
51 | rm -rf $RPM_BUILD_ROOT | |
52 | ||
53 | %py3_install | |
54 | ||
55 | %clean | |
56 | rm -rf $RPM_BUILD_ROOT | |
57 | ||
58 | %files | |
59 | %defattr(644,root,root,755) | |
60 | %doc CHANGES.rst README.rst | |
61 | %{py3_sitescriptdir}/async_timeout | |
62 | %{py3_sitescriptdir}/async_timeout-%{version}-py*.egg-info |