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