]> git.pld-linux.org Git - packages/python-sphinxcontrib-asyncio.git/blame - python-sphinxcontrib-asyncio.spec
- use sphinx-build-2 for docs (not compatible with Sphinx 4)
[packages/python-sphinxcontrib-asyncio.git] / python-sphinxcontrib-asyncio.spec
CommitLineData
f86f7cb6
JB
1#
2# Conditional build:
3%bcond_without doc # Sphinx documentation
b191528a 4%bcond_with tests # unit tests (not included in sdist)
f86f7cb6 5%bcond_without python2 # CPython 2.x module
b191528a 6%bcond_with python3 # CPython 3.x module (built from python3-sphinxcontrib-asyncio.spec)
f86f7cb6
JB
7
8Summary: Sphinx extension to support coroutines in markup
9Summary(pl.UTF-8): Rozszerzenie Sphinksa do obsługi korutyn w znacznikach
10Name: python-sphinxcontrib-asyncio
b191528a 11# keep 0.2.x here for python2/sphinx 1.x support
f86f7cb6 12Version: 0.2.0
4aa815e1 13Release: 4
f86f7cb6
JB
14License: Apache v2
15Group: Libraries/Python
16#Source0Download: https://pypi.org/simple/sphinxcontrib-asyncio/
17Source0: https://files.pythonhosted.org/packages/source/s/sphinxcontrib-asyncio/sphinxcontrib-asyncio-%{version}.tar.gz
18# Source0-md5: ad3372cb3be157a98834c2f121674862
19URL: https://pypi.org/project/sphinxcontrib-asyncio/
20%if %{with python2}
21BuildRequires: python-modules >= 1:2.7
22BuildRequires: python-setuptools
23%if %{with tests}
b191528a 24BuildRequires: python-Sphinx
f86f7cb6
JB
25BuildRequires: python-pytest
26%endif
27%endif
28%if %{with python3}
29BuildRequires: python3-modules >= 1:3.3
30BuildRequires: python3-setuptools
31%if %{with tests}
b191528a 32BuildRequires: python3-Sphinx
f86f7cb6
JB
33BuildRequires: python3-pytest
34%endif
35%endif
36BuildRequires: rpm-pythonprov
37BuildRequires: rpmbuild(macros) >= 1.714
38%if %{with doc}
f501600c 39BuildRequires: sphinx-pdg-2
f86f7cb6
JB
40%endif
41Requires: python-modules >= 1:2.7
7f13dc0d 42Requires: python-sphinxcontrib
f86f7cb6
JB
43BuildArch: noarch
44BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45
46%description
47Sphinx extension for adding asyncio-specific markups.
48
49%description -l pl.UTF-8
50Rozszerzenie Sphinksa do dodawania oznaczeń specyficznych dla asyncio.
51
52%package -n python3-sphinxcontrib-asyncio
53Summary: Sphinx extension to support coroutines in markup
54Summary(pl.UTF-8): Rozszerzenie Sphinksa do obsługi korutyn w znacznikach
55Group: Libraries/Python
56Requires: python3-modules >= 1:3.3
7f13dc0d 57Requires: python3-sphinxcontrib
f86f7cb6
JB
58
59%description -n python3-sphinxcontrib-asyncio
60Sphinx extension for adding asyncio-specific markups.
61
62%description -n python3-sphinxcontrib-asyncio -l pl.UTF-8
63Rozszerzenie Sphinksa do dodawania oznaczeń specyficznych dla asyncio.
64
65%package apidocs
66Summary: API documentation for Python sphinxcontrib-asyncio module
67Summary(pl.UTF-8): Dokumentacja API modułu Pythona sphinxcontrib-asyncio
68Group: Documentation
69
70%description apidocs
71API documentation for Python sphinxcontrib-asyncio module.
72
73%description apidocs -l pl.UTF-8
74Dokumentacja API modułu Pythona sphinxcontrib-asyncio.
75
76%prep
77%setup -q -n sphinxcontrib-asyncio-%{version}
78
79%build
80%if %{with python2}
81%py_build
82
83%if %{with tests}
b191528a 84PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
f86f7cb6
JB
85%{__python} -m pytest tests
86%endif
87%endif
88
89%if %{with python3}
90%py3_build
91
92%if %{with tests}
b191528a 93PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
f86f7cb6
JB
94%{__python3} -m pytest tests
95%endif
96%endif
97
98%if %{with doc}
99PYTHONPATH=$(pwd) \
f501600c
JB
100%{__make} -C docs html \
101 SPHINXBUILD=sphinx-build-2
f86f7cb6
JB
102%endif
103
104%install
105rm -rf $RPM_BUILD_ROOT
106
107%if %{with python2}
108%py_install
109
110%py_postclean
7f13dc0d
JB
111# provides by python-sphinxcontrib in PLD
112%{__rm} $RPM_BUILD_ROOT%{py_sitescriptdir}/sphinxcontrib/__init__.py*
f86f7cb6
JB
113%endif
114
115%if %{with python3}
116%py3_install
7f13dc0d
JB
117
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*
f86f7cb6
JB
121%endif
122
123%clean
124rm -rf $RPM_BUILD_ROOT
125
126%if %{with python2}
127%files
128%defattr(644,root,root,755)
129%doc CHANGES.rst README.rst
f86f7cb6
JB
130%{py_sitescriptdir}/sphinxcontrib/asyncio.py[co]
131%{py_sitescriptdir}/sphinxcontrib_asyncio-%{version}-py*.egg-info
132%endif
133
134%if %{with python3}
135%files -n python3-sphinxcontrib-asyncio
136%defattr(644,root,root,755)
137%doc CHANGES.rst README.rst
f86f7cb6
JB
138%{py3_sitescriptdir}/sphinxcontrib/asyncio.py
139%{py3_sitescriptdir}/sphinxcontrib/__pycache__/asyncio.cpython-*.py[co]
f86f7cb6
JB
140%{py3_sitescriptdir}/sphinxcontrib_asyncio-%{version}-py*.egg-info
141%endif
142
143%if %{with doc}
144%files apidocs
145%defattr(644,root,root,755)
146%doc docs/_build/html/{_static,*.html,*.js}
147%endif
This page took 0.110064 seconds and 4 git commands to generate.