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