]> git.pld-linux.org Git - packages/python-sphinxcontrib-asyncio.git/blob - python-sphinxcontrib-asyncio.spec
- disable python3 here
[packages/python-sphinxcontrib-asyncio.git] / python-sphinxcontrib-asyncio.spec
1 #
2 # Conditional build:
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)
7
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
12 Version:        0.2.0
13 Release:        4
14 License:        Apache v2
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/
20 %if %{with python2}
21 BuildRequires:  python-modules >= 1:2.7
22 BuildRequires:  python-setuptools
23 %if %{with tests}
24 BuildRequires:  python-Sphinx
25 BuildRequires:  python-pytest
26 %endif
27 %endif
28 %if %{with python3}
29 BuildRequires:  python3-modules >= 1:3.3
30 BuildRequires:  python3-setuptools
31 %if %{with tests}
32 BuildRequires:  python3-Sphinx
33 BuildRequires:  python3-pytest
34 %endif
35 %endif
36 BuildRequires:  rpm-pythonprov
37 BuildRequires:  rpmbuild(macros) >= 1.714
38 %if %{with doc}
39 BuildRequires:  sphinx-pdg
40 %endif
41 Requires:       python-modules >= 1:2.7
42 Requires:       python-sphinxcontrib
43 BuildArch:      noarch
44 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45
46 %description
47 Sphinx extension for adding asyncio-specific markups.
48
49 %description -l pl.UTF-8
50 Rozszerzenie Sphinksa do dodawania oznaczeń specyficznych dla asyncio.
51
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
58
59 %description -n python3-sphinxcontrib-asyncio
60 Sphinx extension for adding asyncio-specific markups.
61
62 %description -n python3-sphinxcontrib-asyncio -l pl.UTF-8
63 Rozszerzenie Sphinksa do dodawania oznaczeń specyficznych dla asyncio.
64
65 %package apidocs
66 Summary:        API documentation for Python sphinxcontrib-asyncio module
67 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona sphinxcontrib-asyncio
68 Group:          Documentation
69
70 %description apidocs
71 API documentation for Python sphinxcontrib-asyncio module.
72
73 %description apidocs -l pl.UTF-8
74 Dokumentacja 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}
84 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
85 %{__python} -m pytest tests
86 %endif
87 %endif
88
89 %if %{with python3}
90 %py3_build
91
92 %if %{with tests}
93 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
94 %{__python3} -m pytest tests
95 %endif
96 %endif
97
98 %if %{with doc}
99 PYTHONPATH=$(pwd) \
100 %{__make} -C docs html
101 %endif
102
103 %install
104 rm -rf $RPM_BUILD_ROOT
105
106 %if %{with python2}
107 %py_install
108
109 %py_postclean
110 # provides by python-sphinxcontrib in PLD
111 %{__rm} $RPM_BUILD_ROOT%{py_sitescriptdir}/sphinxcontrib/__init__.py*
112 %endif
113
114 %if %{with python3}
115 %py3_install
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*
120 %endif
121
122 %clean
123 rm -rf $RPM_BUILD_ROOT
124
125 %if %{with python2}
126 %files
127 %defattr(644,root,root,755)
128 %doc CHANGES.rst README.rst
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
137 %{py3_sitescriptdir}/sphinxcontrib/asyncio.py
138 %{py3_sitescriptdir}/sphinxcontrib/__pycache__/asyncio.cpython-*.py[co]
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.097279 seconds and 3 git commands to generate.