]> git.pld-linux.org Git - packages/python-slip.git/blob - python-slip.spec
rebuild with tests and docs
[packages/python-slip.git] / python-slip.spec
1 #
2 # Conditional build:
3 %bcond_without  python2 # CPython 2.x modules
4 %bcond_without  python3 # CPython 3.x modules
5 #
6 Summary:        Miscellaneous convenience, extension and workaround code for Python 2
7 Summary(pl.UTF-8):      Kod różnych udogodnień, rozszerzeń i obejść dla Pythona 2
8 Name:           python-slip
9 Version:        0.6.5
10 Release:        4
11 License:        GPL v2+
12 Group:          Development/Languages/Python
13 #Source0Download: https://github.com/nphilipp/python-slip/releases
14 Source0:        https://github.com/nphilipp/python-slip/releases/download/%{name}-%{version}/%{name}-%{version}.tar.bz2
15 # Source0-md5:  28ae5f93853466c44ec96706ba2a1eb4
16 Patch0:         %{name}-collections_abc.patch
17 URL:            https://github.com/nphilipp/python-slip
18 %if %{with python2}
19 BuildRequires:  python >= 2
20 BuildRequires:  python-devel >= 2
21 %endif
22 %if %{with python3}
23 BuildRequires:  python3 >= 1:3.2
24 BuildRequires:  python3-modules >= 1:3.2
25 %endif
26 BuildRequires:  rpmbuild(macros) >= 1.714
27 Requires:       python-selinux
28 Requires:       python-six >= 1.13.0
29 BuildArch:      noarch
30 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32 %description
33 The Simple Library for Python packages contain miscellaneous code for
34 convenience, extension and workaround purposes.
35
36 This package provides the "slip" and the "slip.util" modules for
37 Python 2.
38
39 %description -l pl.UTF-8
40 Pakiety Simple Library for Python (prostej biblioteki dla Pythona)
41 zawierają kod różnych udogodnień, rozszerzeń i obejść.
42
43 Ten pakiet dostarcza moduły "slip" oraz "slip.util" dla Pythona 2.
44
45 %package dbus
46 Summary:        Convenience Python 2 functions for dbus services
47 Summary(pl.UTF-8):      Wygodne funkcje Pythona 2 dla usług dbus
48 Group:          Libraries
49 Requires:       %{name} = %{version}-%{release}
50 Requires:       python-dbus >= 0.80
51 Requires:       python-decorator
52 # pygobject2 or pygobject3 actually (using slip._wrapper._gobject)
53 Requires:       python-pygobject >= 2
54 Requires:       python-six >= 1.13.0
55 Suggests:       polkit >= 0.94
56 Conflicts:      PolicyKit < 0.8-3
57 Conflicts:      polkit < 0.94
58
59 %description dbus
60 The Simple Library for Python packages contain miscellaneous code for
61 convenience, extension and workaround purposes.
62
63 This package provides slip.dbus.service.Object, which is a
64 dbus.service.Object derivative that ends itself after a certain time
65 without being used and/or if there are no clients anymore on the
66 message bus, as well as convenience functions and decorators for
67 integrating a dbus service with PolicyKit.
68
69 %description dbus -l pl.UTF-8
70 Pakiety Simple Library for Python (prostej biblioteki dla Pythona)
71 zawierają kod różnych udogodnień, rozszerzeń i obejść.
72
73 Ten pakiet dostarcza slip.dbus.service.Object, będący pochodną
74 dbus.service.Object kończącą się po określonym czasie bezużyteczności
75 i/lub kiedy nie ma już klientów magistrali komunikatów, a także
76 wygodne funkcje i dekoratory służące integracji usług dbus z systemem
77 PolicyKit.
78
79 %package gtk
80 Summary:        Code to make auto-wrapping GTK+ labels
81 Summary(pl.UTF-8):      Kod do tworzenia automatycznie zawijanych etykiet GTK+
82 Group:          Libraries
83 Requires:       %{name} = %{version}-%{release}
84 Requires:       python-pygtk-gtk >= 2:2
85
86 %description gtk
87 The Simple Library for Python packages contain miscellaneous code for
88 convenience, extension and workaround purposes.
89
90 This package provides slip.gtk.set_autowrap(), a convenience function
91 which lets GTK+ labels be automatically re-wrapped upon resizing.
92
93 %description gtk -l pl.UTF-8
94 Pakiety Simple Library for Python (prostej biblioteki dla Pythona)
95 zawierają kod różnych udogodnień, rozszerzeń i obejść.
96
97 Ten pakiet dostarcza slip.gtk.set_autowrap() - wygodną funkcję
98 pozwalającą na automatyczne zawijanie etykiet GTK+ przy zmianie
99 rozmiaru.
100
101 %package -n python3-slip
102 Summary:        Miscellaneous convenience, extension and workaround code for Python 3
103 Summary(pl.UTF-8):      Kod różnych udogodnień, rozszerzeń i obejść dla Pythona 3
104 Group:          Development/Languages/Python
105 Requires:       python3-modules >= 3.2
106
107 %description -n python3-slip
108 The Simple Library for Python packages contain miscellaneous code for
109 convenience, extension and workaround purposes.
110
111 This package provides the "slip" and the "slip.util" modules for
112 Python 3.
113
114 %description -n python3-slip -l pl.UTF-8
115 Pakiety Simple Library for Python (prostej biblioteki dla Pythona)
116 zawierają kod różnych udogodnień, rozszerzeń i obejść.
117
118 Ten pakiet dostarcza moduły "slip" oraz "slip.util" dla Pythona 3.
119
120 %package -n python3-slip-dbus
121 Summary:        Convenience Python 3 functions for dbus services
122 Summary(pl.UTF-8):      Wygodne funkcje Pythona 3 dla usług dbus
123 Group:          Libraries
124 Requires:       python3-dbus >= 0.80
125 Requires:       python3-decorator
126 Requires:       python3-pygobject3 >= 3
127 Requires:       python3-six >= 1.13.0
128 Requires:       python3-slip = %{version}-%{release}
129 Suggests:       polkit >= 0.94
130 Conflicts:      PolicyKit < 0.8-3
131 Conflicts:      polkit < 0.94
132
133 %description -n python3-slip-dbus
134 The Simple Library for Python packages contain miscellaneous code for
135 convenience, extension and workaround purposes.
136
137 This package provides slip.dbus.service.Object, which is a
138 dbus.service.Object derivative that ends itself after a certain time
139 without being used and/or if there are no clients anymore on the
140 message bus, as well as convenience functions and decorators for
141 integrating a dbus service with PolicyKit.
142
143 %description -n python3-slip-dbus -l pl.UTF-8
144 Pakiety Simple Library for Python (prostej biblioteki dla Pythona)
145 zawierają kod różnych udogodnień, rozszerzeń i obejść.
146
147 Ten pakiet dostarcza slip.dbus.service.Object, będący pochodną
148 dbus.service.Object kończącą się po określonym czasie bezużyteczności
149 i/lub kiedy nie ma już klientów magistrali komunikatów, a także
150 wygodne funkcje i dekoratory służące integracji usług dbus z systemem
151 PolicyKit.
152
153 %prep
154 %setup -q
155 %patch0 -p1
156
157 %build
158 %{__make} $(pwd)/setup.py
159
160 %if %{with python2}
161 %py_build
162 %endif
163
164 %if %{with python3}
165 %py3_build
166 %endif
167
168 %install
169 rm -rf $RPM_BUILD_ROOT
170
171 %if %{with python2}
172 %py_install
173
174 %py_postclean
175 %endif
176
177 %if %{with python3}
178 %py3_install
179 %endif
180
181 install -d $RPM_BUILD_ROOT%{_examplesdir}
182 cp -pr doc/dbus/example $RPM_BUILD_ROOT%{_examplesdir}/%{name}-dbus-%{version}
183
184 %clean
185 rm -rf $RPM_BUILD_ROOT
186
187 %if %{with python2}
188 %files
189 %defattr(644,root,root,755)
190 %doc AUTHORS
191 %dir %{py_sitescriptdir}/slip
192 %{py_sitescriptdir}/slip/__init__.py[co]
193 %{py_sitescriptdir}/slip/_wrappers
194 %{py_sitescriptdir}/slip/util
195 %{py_sitescriptdir}/slip-%{version}-py*.egg-info
196
197 %files dbus
198 %defattr(644,root,root,755)
199 %doc doc/dbus/README
200 %{py_sitescriptdir}/slip/dbus
201 %{py_sitescriptdir}/slip.dbus-%{version}-py*.egg-info
202 %{_examplesdir}/%{name}-dbus-%{version}
203
204 %files gtk
205 %defattr(644,root,root,755)
206 %{py_sitescriptdir}/slip/gtk
207 %{py_sitescriptdir}/slip.gtk-%{version}-py*.egg-info
208 %endif
209
210 %if %{with python3}
211 %files -n python3-slip
212 %defattr(644,root,root,755)
213 %doc AUTHORS
214 %dir %{py3_sitescriptdir}/slip
215 %{py3_sitescriptdir}/slip/__init__.py
216 %{py3_sitescriptdir}/slip/__pycache__
217 %{py3_sitescriptdir}/slip/_wrappers
218 %{py3_sitescriptdir}/slip/util
219 %{py3_sitescriptdir}/slip-%{version}-py*.egg-info
220
221 %files -n python3-slip-dbus
222 %defattr(644,root,root,755)
223 %doc doc/dbus/README
224 %{py3_sitescriptdir}/slip/dbus
225 %{py3_sitescriptdir}/slip.dbus-%{version}-py*.egg-info
226 %endif
This page took 0.108315 seconds and 3 git commands to generate.