3 %bcond_without doc # Sphinx documentation
4 %bcond_without tests # unit tests
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
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
18 BuildRequires: python3-setuptools
20 BuildRequires: python3-pytest
21 BuildRequires: python3-pytest-cov
23 BuildRequires: rpm-pythonprov
24 BuildRequires: rpmbuild(macros) >= 1.714
26 BuildRequires: sphinx-pdg-3
28 Requires: python3-modules >= 1:3.5
30 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33 Python 3.6 added async generators (PEP-525). Python 3.7 adds some more
34 tools to make them usable, like contextlib.asynccontextmanager.
36 This library gives you all that back to Python 3.5.
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.
43 Ta biblioteka udostępnia to wszystko dla Pythona 3.5.
46 Summary: async_generator API documentation
47 Summary(pl.UTF-8): Dokumentacja API async_generator
51 API documentation for async_generator.
53 %description apidocs -l pl.UTF-8
54 Dokumentacja API async_generator.
57 %setup -q -n async_generator-%{version}
63 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
64 %{__python3} -m pytest async_generator/_tests
68 %{__make} -C docs html \
69 SPHINXBUILD=sphinx-build-3
73 rm -rf $RPM_BUILD_ROOT
78 rm -rf $RPM_BUILD_ROOT
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
88 %defattr(644,root,root,755)
89 %doc docs/build/html/{_static,*.html,*.js}