]> git.pld-linux.org Git - packages/python-sphinxcontrib-asyncio.git/blame - python-sphinxcontrib-asyncio.spec
- disable python3 here
[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}
39BuildRequires: sphinx-pdg
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) \
100%{__make} -C docs html
101%endif
102
103%install
104rm -rf $RPM_BUILD_ROOT
105
106%if %{with python2}
107%py_install
108
109%py_postclean
7f13dc0d
JB
110# provides by python-sphinxcontrib in PLD
111%{__rm} $RPM_BUILD_ROOT%{py_sitescriptdir}/sphinxcontrib/__init__.py*
f86f7cb6
JB
112%endif
113
114%if %{with python3}
115%py3_install
7f13dc0d
JB
116
117# provides by python3-sphinxcontrib in PLD
118%{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/sphinxcontrib/__init__.py \
119 $RPM_BUILD_ROOT%{py3_sitescriptdir}/sphinxcontrib/__pycache__/__init__.*.py*
f86f7cb6
JB
120%endif
121
122%clean
123rm -rf $RPM_BUILD_ROOT
124
125%if %{with python2}
126%files
127%defattr(644,root,root,755)
128%doc CHANGES.rst README.rst
f86f7cb6
JB
129%{py_sitescriptdir}/sphinxcontrib/asyncio.py[co]
130%{py_sitescriptdir}/sphinxcontrib_asyncio-%{version}-py*.egg-info
131%endif
132
133%if %{with python3}
134%files -n python3-sphinxcontrib-asyncio
135%defattr(644,root,root,755)
136%doc CHANGES.rst README.rst
f86f7cb6
JB
137%{py3_sitescriptdir}/sphinxcontrib/asyncio.py
138%{py3_sitescriptdir}/sphinxcontrib/__pycache__/asyncio.cpython-*.py[co]
f86f7cb6
JB
139%{py3_sitescriptdir}/sphinxcontrib_asyncio-%{version}-py*.egg-info
140%endif
141
142%if %{with doc}
143%files apidocs
144%defattr(644,root,root,755)
145%doc docs/_build/html/{_static,*.html,*.js}
146%endif
This page took 0.131951 seconds and 4 git commands to generate.