]> git.pld-linux.org Git - packages/python-sphinxcontrib-asyncio.git/blob - python-sphinxcontrib-asyncio.spec
22586b0203abb0017a4b15b60fa43496d96f6386
[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:        4
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 Requires:       python-sphinxcontrib
40 BuildArch:      noarch
41 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42
43 %description
44 Sphinx extension for adding asyncio-specific markups.
45
46 %description -l pl.UTF-8
47 Rozszerzenie Sphinksa do dodawania oznaczeń specyficznych dla asyncio.
48
49 %package -n python3-sphinxcontrib-asyncio
50 Summary:        Sphinx extension to support coroutines in markup
51 Summary(pl.UTF-8):      Rozszerzenie Sphinksa do obsługi korutyn w znacznikach
52 Group:          Libraries/Python
53 Requires:       python3-modules >= 1:3.3
54 Requires:       python3-sphinxcontrib
55
56 %description -n python3-sphinxcontrib-asyncio
57 Sphinx extension for adding asyncio-specific markups.
58
59 %description -n python3-sphinxcontrib-asyncio -l pl.UTF-8
60 Rozszerzenie Sphinksa do dodawania oznaczeń specyficznych dla asyncio.
61
62 %package apidocs
63 Summary:        API documentation for Python sphinxcontrib-asyncio module
64 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona sphinxcontrib-asyncio
65 Group:          Documentation
66
67 %description apidocs
68 API documentation for Python sphinxcontrib-asyncio module.
69
70 %description apidocs -l pl.UTF-8
71 Dokumentacja API modułu Pythona sphinxcontrib-asyncio.
72
73 %prep
74 %setup -q -n sphinxcontrib-asyncio-%{version}
75
76 %build
77 %if %{with python2}
78 %py_build
79
80 %if %{with tests}
81 %{__python} -m pytest tests
82 %endif
83 %endif
84
85 %if %{with python3}
86 %py3_build
87
88 %if %{with tests}
89 %{__python3} -m pytest tests
90 %endif
91 %endif
92
93 %if %{with doc}
94 PYTHONPATH=$(pwd) \
95 %{__make} -C docs html
96 %endif
97
98 %install
99 rm -rf $RPM_BUILD_ROOT
100
101 %if %{with python2}
102 %py_install
103
104 %py_postclean
105 # provides by python-sphinxcontrib in PLD
106 %{__rm} $RPM_BUILD_ROOT%{py_sitescriptdir}/sphinxcontrib/__init__.py*
107 %endif
108
109 %if %{with python3}
110 %py3_install
111
112 # provides by python3-sphinxcontrib in PLD
113 %{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/sphinxcontrib/__init__.py \
114         $RPM_BUILD_ROOT%{py3_sitescriptdir}/sphinxcontrib/__pycache__/__init__.*.py*
115 %endif
116
117 %clean
118 rm -rf $RPM_BUILD_ROOT
119
120 %if %{with python2}
121 %files
122 %defattr(644,root,root,755)
123 %doc CHANGES.rst README.rst
124 %{py_sitescriptdir}/sphinxcontrib/asyncio.py[co]
125 %{py_sitescriptdir}/sphinxcontrib_asyncio-%{version}-py*.egg-info
126 %endif
127
128 %if %{with python3}
129 %files -n python3-sphinxcontrib-asyncio
130 %defattr(644,root,root,755)
131 %doc CHANGES.rst README.rst
132 %{py3_sitescriptdir}/sphinxcontrib/asyncio.py
133 %{py3_sitescriptdir}/sphinxcontrib/__pycache__/asyncio.cpython-*.py[co]
134 %{py3_sitescriptdir}/sphinxcontrib_asyncio-%{version}-py*.egg-info
135 %endif
136
137 %if %{with doc}
138 %files apidocs
139 %defattr(644,root,root,755)
140 %doc docs/_build/html/{_static,*.html,*.js}
141 %endif
This page took 0.062494 seconds and 2 git commands to generate.