]>
Commit | Line | Data |
---|---|---|
773f3a5d JB |
1 | # |
2 | # Conditional build: | |
f4fa3509 JB |
3 | %bcond_without doc # Sphinx documentation |
4 | %bcond_without tests # unit tests | |
773f3a5d JB |
5 | |
6 | Summary: Async generators and context managers for Python 3.5+ | |
7 | Summary(pl.UTF-8): Asynchroniczne generatory i zarządcy kontekstu dla Pythona 3.5+ | |
8 | Name: python3-async_generator | |
9 | Version: 1.10 | |
c264a2d8 | 10 | Release: 3 |
773f3a5d JB |
11 | License: Apache v2.0 or MIT |
12 | Group: Libraries/Python | |
13 | #Source0Download: https://pypi.org/simple/async_generator/ | |
14 | Source0: https://files.pythonhosted.org/packages/source/a/async_generator/async_generator-%{version}.tar.gz | |
15 | # Source0-md5: 078a29b4afb3d7f38c097a530f042a55 | |
16 | URL: https://pypi.org/project/async_generator/ | |
17 | BuildRequires: python3-modules >= 1:3.5 | |
773f3a5d JB |
18 | BuildRequires: python3-setuptools |
19 | %if %{with tests} | |
20 | BuildRequires: python3-pytest | |
21 | BuildRequires: python3-pytest-cov | |
22 | %endif | |
23 | BuildRequires: rpm-pythonprov | |
24 | BuildRequires: rpmbuild(macros) >= 1.714 | |
25 | %if %{with doc} | |
26 | BuildRequires: sphinx-pdg-3 | |
27 | %endif | |
28 | Requires: python3-modules >= 1:3.5 | |
29 | BuildArch: noarch | |
30 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
31 | ||
32 | %description | |
33 | Python 3.6 added async generators (PEP-525). Python 3.7 adds some more | |
34 | tools to make them usable, like contextlib.asynccontextmanager. | |
35 | ||
36 | This library gives you all that back to Python 3.5. | |
37 | ||
38 | %description -l pl.UTF-8 | |
39 | W Pythonie 3.6 zostały wprowadzone asynchroniczne generatory | |
40 | (PEP-525). W Pythonie 3.7 doszło kilka nowych narzędzi, czyniących je | |
41 | bardziej użytecznymi, jak contextlib.asynccontextmanager. | |
42 | ||
43 | Ta biblioteka udostępnia to wszystko dla Pythona 3.5. | |
44 | ||
45 | %package apidocs | |
46 | Summary: async_generator API documentation | |
47 | Summary(pl.UTF-8): Dokumentacja API async_generator | |
48 | Group: Documentation | |
49 | ||
50 | %description apidocs | |
51 | API documentation for async_generator. | |
52 | ||
53 | %description apidocs -l pl.UTF-8 | |
54 | Dokumentacja API async_generator. | |
55 | ||
56 | %prep | |
57 | %setup -q -n async_generator-%{version} | |
58 | ||
59 | %build | |
60 | %py3_build | |
61 | ||
62 | %if %{with tests} | |
f4fa3509 | 63 | PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \ |
773f3a5d JB |
64 | %{__python3} -m pytest async_generator/_tests |
65 | %endif | |
66 | ||
67 | %if %{with doc} | |
68 | %{__make} -C docs html \ | |
69 | SPHINXBUILD=sphinx-build-3 | |
70 | %endif | |
71 | ||
72 | %install | |
73 | rm -rf $RPM_BUILD_ROOT | |
74 | ||
75 | %py3_install | |
76 | ||
77 | %clean | |
78 | rm -rf $RPM_BUILD_ROOT | |
79 | ||
80 | %files | |
81 | %defattr(644,root,root,755) | |
82 | %doc LICENSE LICENSE.MIT README.rst | |
83 | %{py3_sitescriptdir}/async_generator | |
84 | %{py3_sitescriptdir}/async_generator-%{version}-py*.egg-info | |
85 | ||
86 | %if %{with doc} | |
87 | %files apidocs | |
88 | %defattr(644,root,root,755) | |
89 | %doc docs/build/html/{_static,*.html,*.js} | |
90 | %endif |