3 %bcond_without doc # Sphinx documentation
4 %bcond_with tests # unit tests (not included in sdist)
5 %bcond_without python2 # CPython 2.x module
6 %bcond_with python3 # CPython 3.x module (built from python3-sphinxcontrib-asyncio.spec)
8 Summary: Sphinx extension to support coroutines in markup
9 Summary(pl.UTF-8): Rozszerzenie Sphinksa do obsługi korutyn w znacznikach
10 Name: python-sphinxcontrib-asyncio
11 # keep 0.2.x here for python2/sphinx 1.x support
15 Group: Libraries/Python
16 #Source0Download: https://pypi.org/simple/sphinxcontrib-asyncio/
17 Source0: https://files.pythonhosted.org/packages/source/s/sphinxcontrib-asyncio/sphinxcontrib-asyncio-%{version}.tar.gz
18 # Source0-md5: ad3372cb3be157a98834c2f121674862
19 URL: https://pypi.org/project/sphinxcontrib-asyncio/
21 BuildRequires: python-modules >= 1:2.7
22 BuildRequires: python-setuptools
24 BuildRequires: python-Sphinx
25 BuildRequires: python-pytest
29 BuildRequires: python3-modules >= 1:3.3
30 BuildRequires: python3-setuptools
32 BuildRequires: python3-Sphinx
33 BuildRequires: python3-pytest
36 BuildRequires: rpm-pythonprov
37 BuildRequires: rpmbuild(macros) >= 1.714
39 BuildRequires: sphinx-pdg-2
41 Requires: python-modules >= 1:2.7
42 Requires: python-sphinxcontrib
44 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47 Sphinx extension for adding asyncio-specific markups.
49 %description -l pl.UTF-8
50 Rozszerzenie Sphinksa do dodawania oznaczeń specyficznych dla asyncio.
52 %package -n python3-sphinxcontrib-asyncio
53 Summary: Sphinx extension to support coroutines in markup
54 Summary(pl.UTF-8): Rozszerzenie Sphinksa do obsługi korutyn w znacznikach
55 Group: Libraries/Python
56 Requires: python3-modules >= 1:3.3
57 Requires: python3-sphinxcontrib
59 %description -n python3-sphinxcontrib-asyncio
60 Sphinx extension for adding asyncio-specific markups.
62 %description -n python3-sphinxcontrib-asyncio -l pl.UTF-8
63 Rozszerzenie Sphinksa do dodawania oznaczeń specyficznych dla asyncio.
66 Summary: API documentation for Python sphinxcontrib-asyncio module
67 Summary(pl.UTF-8): Dokumentacja API modułu Pythona sphinxcontrib-asyncio
71 API documentation for Python sphinxcontrib-asyncio module.
73 %description apidocs -l pl.UTF-8
74 Dokumentacja API modułu Pythona sphinxcontrib-asyncio.
77 %setup -q -n sphinxcontrib-asyncio-%{version}
84 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
85 %{__python} -m pytest tests
93 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
94 %{__python3} -m pytest tests
100 %{__make} -C docs html \
101 SPHINXBUILD=sphinx-build-2
105 rm -rf $RPM_BUILD_ROOT
111 # provides by python-sphinxcontrib in PLD
112 %{__rm} $RPM_BUILD_ROOT%{py_sitescriptdir}/sphinxcontrib/__init__.py*
118 # provides by python3-sphinxcontrib in PLD
119 %{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/sphinxcontrib/__init__.py \
120 $RPM_BUILD_ROOT%{py3_sitescriptdir}/sphinxcontrib/__pycache__/__init__.*.py*
124 rm -rf $RPM_BUILD_ROOT
128 %defattr(644,root,root,755)
129 %doc CHANGES.rst README.rst
130 %{py_sitescriptdir}/sphinxcontrib/asyncio.py[co]
131 %{py_sitescriptdir}/sphinxcontrib_asyncio-%{version}-py*.egg-info
135 %files -n python3-sphinxcontrib-asyncio
136 %defattr(644,root,root,755)
137 %doc CHANGES.rst README.rst
138 %{py3_sitescriptdir}/sphinxcontrib/asyncio.py
139 %{py3_sitescriptdir}/sphinxcontrib/__pycache__/asyncio.cpython-*.py[co]
140 %{py3_sitescriptdir}/sphinxcontrib_asyncio-%{version}-py*.egg-info
145 %defattr(644,root,root,755)
146 %doc docs/_build/html/{_static,*.html,*.js}