]>
Commit | Line | Data |
---|---|---|
a1aa2a03 JB |
1 | # |
2 | # Conditional build: | |
c6364fe1 | 3 | %bcond_without tests # nose tests |
b06ebd43 JR |
4 | %bcond_without python2 # CPython 2.x module |
5 | %bcond_without python3 # CPython 3.x module | |
a1aa2a03 JB |
6 | |
7 | Summary: Sphinx Doxygen renderer | |
8 | Summary(pl.UTF-8): Renderer Doxygena dla systemu dokumentacji Sphinx | |
a1aa2a03 | 9 | Name: python-breathe |
32e5e8a4 JB |
10 | # NOTE: keep 4.12 here; 4.13+ requires Sphinx 2 and Python 3 |
11 | Version: 4.12.0 | |
12 | Release: 1 | |
a1aa2a03 JB |
13 | License: BSD |
14 | Group: Development/Languages/Python | |
c6364fe1 | 15 | #Source0Download: https://github.com/michaeljones/breathe/releases |
057588b3 | 16 | Source0: https://github.com/michaeljones/breathe/archive/v%{version}/%{name}-%{version}.tar.gz |
32e5e8a4 | 17 | # Source0-md5: 2288749c6e3b2fe1e527873e97144843 |
a1aa2a03 | 18 | URL: https://github.com/michaeljones/breathe |
b06ebd43 | 19 | %if %{with python2} |
c6364fe1 | 20 | BuildRequires: python-modules >= 1:2.5 |
32e5e8a4 | 21 | BuildRequires: python-setuptools |
c6364fe1 | 22 | %if %{with tests} |
32e5e8a4 JB |
23 | BuildRequires: python-Sphinx >= 1.8 |
24 | BuildRequires: python-docutils >= 0.12 | |
c6364fe1 | 25 | BuildRequires: python-nose |
32e5e8a4 | 26 | BuildRequires: python-six >= 1.9 |
c6364fe1 | 27 | %endif |
b06ebd43 JR |
28 | %endif |
29 | %if %{with python3} | |
c6364fe1 | 30 | BuildRequires: python3-modules >= 1:3.2 |
32e5e8a4 | 31 | BuildRequires: python3-setuptools |
c6364fe1 | 32 | %if %{with tests} |
32e5e8a4 JB |
33 | BuildRequires: python3-Sphinx >= 1.8 |
34 | BuildRequires: python3-docutils >= 0.12 | |
c6364fe1 | 35 | BuildRequires: python3-nose |
32e5e8a4 | 36 | BuildRequires: python3-six >= 1.9 |
c6364fe1 | 37 | %endif |
b06ebd43 | 38 | %endif |
a1aa2a03 | 39 | BuildRequires: rpm-pythonprov |
32e5e8a4 JB |
40 | BuildRequires: rpmbuild(macros) >= 1.714 |
41 | Requires: python-modules >= 1:2.5 | |
a1aa2a03 JB |
42 | BuildArch: noarch |
43 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
44 | ||
45 | %description | |
46 | Breathe is an extension to reStructuredText and Sphinx to be able to | |
47 | read and render the Doxygen XML output. | |
48 | ||
49 | %description -l pl.UTF-8 | |
50 | Breathe to rozszerzenie do systemu dokumentacji reStructuredText i | |
51 | Sphinx, pozwalające na odczyt i renderowanie wyjścia XML z Doxygena. | |
52 | ||
b06ebd43 JR |
53 | %package -n python3-breathe |
54 | Summary: Sphinx Doxygen renderer | |
55 | Summary(pl.UTF-8): Renderer Doxygena dla systemu dokumentacji Sphinx | |
56 | Group: Libraries/Python | |
32e5e8a4 | 57 | Requires: python3-modules >= 1:3.2 |
b06ebd43 JR |
58 | |
59 | %description -n python3-breathe | |
60 | Breathe is an extension to reStructuredText and Sphinx to be able to | |
61 | read and render the Doxygen XML output. | |
62 | ||
63 | %description -n python3-breathe -l pl.UTF-8 | |
64 | Breathe to rozszerzenie do systemu dokumentacji reStructuredText i | |
65 | Sphinx, pozwalające na odczyt i renderowanie wyjścia XML z Doxygena. | |
66 | ||
a1aa2a03 JB |
67 | %prep |
68 | %setup -q -n breathe-%{version} | |
69 | ||
70 | %build | |
b06ebd43 | 71 | %if %{with python2} |
c6364fe1 JB |
72 | %py_build |
73 | ||
74 | %if %{with tests} | |
75 | cd tests | |
76 | PYTHONPATH=.. \ | |
77 | nosetests-%{py_ver} | |
78 | cd .. | |
79 | %endif | |
b06ebd43 | 80 | %endif |
a1aa2a03 | 81 | |
b06ebd43 | 82 | %if %{with python3} |
c6364fe1 JB |
83 | %py3_build |
84 | ||
85 | %if %{with tests} | |
86 | cd tests | |
87 | PYTHONPATH=.. \ | |
88 | nosetests-%{py3_ver} | |
89 | cd .. | |
90 | %endif | |
b06ebd43 | 91 | %endif |
a1aa2a03 JB |
92 | |
93 | %install | |
94 | rm -rf $RPM_BUILD_ROOT | |
95 | ||
b06ebd43 | 96 | %if %{with python2} |
173b9229 | 97 | %py_install |
a1aa2a03 JB |
98 | |
99 | %py_postclean | |
c6364fe1 JB |
100 | |
101 | %{__mv} $RPM_BUILD_ROOT%{_bindir}/breathe-apidoc{,-2} | |
b06ebd43 JR |
102 | %endif |
103 | ||
104 | %if %{with python3} | |
105 | %py3_install | |
c6364fe1 JB |
106 | |
107 | %{__mv} $RPM_BUILD_ROOT%{_bindir}/breathe-apidoc{,-3} | |
108 | ln -sf breathe-apidoc-3 $RPM_BUILD_ROOT%{_bindir}/breathe-apidoc | |
b06ebd43 | 109 | %endif |
a1aa2a03 JB |
110 | |
111 | %clean | |
112 | rm -rf $RPM_BUILD_ROOT | |
113 | ||
114 | %files | |
115 | %defattr(644,root,root,755) | |
c6364fe1 JB |
116 | %doc LICENSE README.rst |
117 | %attr(755,root,root) %{_bindir}/breathe-apidoc-2 | |
a1aa2a03 JB |
118 | %{py_sitescriptdir}/breathe |
119 | %{py_sitescriptdir}/breathe-%{version}-py*.egg-info | |
b06ebd43 JR |
120 | |
121 | %files -n python3-breathe | |
122 | %defattr(644,root,root,755) | |
c6364fe1 JB |
123 | %doc LICENSE README.rst |
124 | %attr(755,root,root) %{_bindir}/breathe-apidoc | |
125 | %attr(755,root,root) %{_bindir}/breathe-apidoc-3 | |
b06ebd43 JR |
126 | %{py3_sitescriptdir}/breathe |
127 | %{py3_sitescriptdir}/breathe-%{version}-py*.egg-info |