]>
Commit | Line | Data |
---|---|---|
6d342a7a JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without doc # Sphinx documentation | |
4 | %bcond_without tests # unit tests | |
5 | %bcond_without python2 # CPython 2.x module | |
6 | %bcond_without python3 # CPython 3.x module | |
7 | ||
8 | %if %{without python3} | |
9 | %undefine with_doc | |
10 | %endif | |
11 | Summary: Parse D-Bus introspection XML and process it in varous ways | |
12 | Summary(pl.UTF-8): Analiza opisów XML protokołu D-Bus i przetwarzanie na różne sposoby | |
13 | Name: python-dbus-deviation | |
14 | Version: 0.6.0 | |
224ac5f6 | 15 | Release: 2 |
6d342a7a JB |
16 | License: LGPL v2.1+ |
17 | Group: Libraries/Python | |
18 | #Source0Download: https://pypi.org/simple/dbus-deviation/ | |
19 | Source0: https://files.pythonhosted.org/packages/source/d/dbus-deviation/dbus-deviation-%{version}.tar.gz | |
20 | # Source0-md5: 0b0bdee54cb82dcc5641f977527a9daf | |
21 | URL: https://pypi.org/project/dbus-deviation/ | |
22 | %if %{with python2} | |
23 | BuildRequires: python-Sphinx | |
24 | BuildRequires: python-modules >= 1:2.5 | |
25 | BuildRequires: python-setuptools | |
26 | BuildRequires: python-setuptools_git >= 0.3 | |
27 | BuildRequires: python-setuptools_pep8 | |
28 | %if %{with tests} | |
29 | BuildRequires: python-lxml | |
30 | %endif | |
31 | %endif | |
32 | %if %{with python3} | |
33 | BuildRequires: python3-Sphinx | |
34 | BuildRequires: python3-modules >= 1:3.2 | |
35 | BuildRequires: python3-setuptools | |
0959a4c4 JB |
36 | BuildRequires: python3-setuptools_git >= 0.3 |
37 | BuildRequires: python3-setuptools_pep8 | |
6d342a7a JB |
38 | %if %{with tests} |
39 | BuildRequires: python3-lxml | |
40 | %endif | |
41 | %endif | |
42 | BuildRequires: rpm-pythonprov | |
43 | BuildRequires: rpmbuild(macros) >= 1.714 | |
44 | %if %{with doc} | |
45 | BuildRequires: sphinx-pdg-3 | |
46 | %endif | |
47 | Requires: python-modules >= 1:2.5 | |
48 | BuildArch: noarch | |
49 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
50 | ||
51 | %description | |
52 | dbus-deviation is a project for parsing D-Bus introspection XML and | |
53 | processing it in various ways. Its main tool is dbus-interface-diff, | |
54 | which calculates the difference between two D-Bus APIs for the purpose | |
55 | of checking for API breaks. | |
56 | ||
57 | This functionality is also available as a Python module, | |
58 | dbusdeviation. | |
59 | ||
60 | %description -l pl.UTF-8 | |
61 | dbus-deviation to projekt do analizy opisów XML protokołu D-Bus i | |
62 | przetwarzania ich na różne sposoby. Główne narzędzie to | |
63 | dbus-interface-diff, wyliczające różnice między dwoma API D-Bus na | |
64 | potrzeby sprawdzania zmian API. | |
65 | ||
66 | Funkcjonalność jest dostępna także jako moduł Pythona dbusdeviation. | |
67 | ||
68 | %package -n python3-dbus-deviation | |
69 | Summary: Parse D-Bus introspection XML and process it in varous ways | |
70 | Summary(pl.UTF-8): Analiza opisów XML protokołu D-Bus i przetwarzanie na różne sposoby | |
71 | Group: Libraries/Python | |
72 | Requires: python3-modules >= 1:3.2 | |
73 | ||
74 | %description -n python3-dbus-deviation | |
75 | dbus-deviation is a project for parsing D-Bus introspection XML and | |
76 | processing it in various ways. Its main tool is dbus-interface-diff, | |
77 | which calculates the difference between two D-Bus APIs for the purpose | |
78 | of checking for API breaks. | |
79 | ||
80 | This functionality is also available as a Python module, | |
81 | dbusdeviation. | |
82 | ||
83 | %description -n python3-dbus-deviation -l pl.UTF-8 | |
84 | dbus-deviation to projekt do analizy opisów XML protokołu D-Bus i | |
85 | przetwarzania ich na różne sposoby. Główne narzędzie to | |
86 | dbus-interface-diff, wyliczające różnice między dwoma API D-Bus na | |
87 | potrzeby sprawdzania zmian API. | |
88 | ||
89 | Funkcjonalność jest dostępna także jako moduł Pythona dbusdeviation. | |
90 | ||
91 | %package apidocs | |
92 | Summary: API documentation for Python dbus-deviation module | |
93 | Summary(pl.UTF-8): Dokumentacja API modułu Pythona dbus-deviation | |
94 | Group: Documentation | |
95 | ||
96 | %description apidocs | |
97 | API documentation for Python dbus-deviation module. | |
98 | ||
99 | %description apidocs -l pl.UTF-8 | |
100 | Dokumentacja API modułu Pythona dbus-deviation. | |
101 | ||
102 | %prep | |
103 | %setup -q -n dbus-deviation-%{version} | |
104 | ||
105 | %build | |
106 | %if %{with python2} | |
107 | %py_build %{?with_tests:test} | |
108 | %endif | |
109 | ||
110 | %if %{with python3} | |
111 | %py3_build %{?with_tests:test} %{?with_doc:build_sphinx} | |
112 | %endif | |
113 | ||
114 | %install | |
115 | rm -rf $RPM_BUILD_ROOT | |
116 | ||
117 | %if %{with python2} | |
118 | %py_install | |
119 | ||
120 | %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/{dbusapi,dbusdeviation}/tests | |
121 | %py_postclean | |
122 | ||
123 | %if %{with python3} | |
124 | %{__rm} $RPM_BUILD_ROOT%{_bindir}/dbus-interface-* | |
125 | %endif | |
126 | %endif | |
127 | ||
128 | %if %{with python3} | |
129 | %py3_install | |
130 | ||
131 | %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/{dbusapi,dbusdeviation}/tests | |
132 | %endif | |
133 | ||
134 | %clean | |
135 | rm -rf $RPM_BUILD_ROOT | |
136 | ||
137 | %if %{with python2} | |
138 | %files | |
139 | %defattr(644,root,root,755) | |
140 | %doc AUTHORS NEWS README | |
141 | %if %{without python3} | |
142 | %attr(755,root,root) %{_bindir}/dbus-interface-diff | |
143 | %attr(755,root,root) %{_bindir}/dbus-interface-vcs-helper | |
144 | %endif | |
145 | %{py_sitescriptdir}/dbusapi | |
146 | %{py_sitescriptdir}/dbusdeviation | |
147 | %{py_sitescriptdir}/dbus_deviation-%{version}-py*.egg-info | |
148 | %endif | |
149 | ||
150 | %if %{with python3} | |
151 | %files -n python3-dbus-deviation | |
152 | %defattr(644,root,root,755) | |
153 | %doc AUTHORS NEWS README | |
154 | %attr(755,root,root) %{_bindir}/dbus-interface-diff | |
155 | %attr(755,root,root) %{_bindir}/dbus-interface-vcs-helper | |
156 | %{py3_sitescriptdir}/dbusapi | |
157 | %{py3_sitescriptdir}/dbusdeviation | |
158 | %{py3_sitescriptdir}/dbus_deviation-%{version}-py*.egg-info | |
159 | %endif | |
160 | ||
161 | %if %{with doc} | |
162 | %files apidocs | |
163 | %defattr(644,root,root,755) | |
164 | %doc build-3/sphinx/html/{_modules,_static,*.html,*.js} | |
165 | %endif |