]>
Commit | Line | Data |
---|---|---|
f2143082 JB |
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 | |
de525aa7 | 8 | Name: python-slip |
a734686f JB |
9 | Version: 0.6.5 |
10 | Release: 1 | |
de525aa7 ER |
11 | License: GPL v2+ |
12 | Group: Development/Languages/Python | |
a734686f JB |
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 | |
f2143082 | 18 | %if %{with python2} |
cec4203b | 19 | BuildRequires: python >= 2 |
cec4203b | 20 | BuildRequires: python-devel >= 2 |
f2143082 JB |
21 | %endif |
22 | %if %{with python3} | |
641191e1 ER |
23 | BuildRequires: python3 >= 1:3.2 |
24 | BuildRequires: python3-modules >= 1:3.2 | |
f2143082 | 25 | %endif |
a734686f | 26 | BuildRequires: rpmbuild(macros) >= 1.714 |
de525aa7 | 27 | Requires: python-selinux |
a734686f | 28 | Requires: python-six >= 1.13.0 |
de525aa7 ER |
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 | ||
f2143082 JB |
36 | This package provides the "slip" and the "slip.util" modules for |
37 | Python 2. | |
de525aa7 | 38 | |
cec4203b JB |
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 | ||
f2143082 | 43 | Ten pakiet dostarcza moduły "slip" oraz "slip.util" dla Pythona 2. |
cec4203b | 44 | |
de525aa7 | 45 | %package dbus |
f2143082 JB |
46 | Summary: Convenience Python 2 functions for dbus services |
47 | Summary(pl.UTF-8): Wygodne funkcje Pythona 2 dla usług dbus | |
de525aa7 ER |
48 | Group: Libraries |
49 | Requires: %{name} = %{version}-%{release} | |
de525aa7 ER |
50 | Requires: python-dbus >= 0.80 |
51 | Requires: python-decorator | |
f2143082 | 52 | # pygobject2 or pygobject3 actually (using slip._wrapper._gobject) |
cec4203b | 53 | Requires: python-pygobject >= 2 |
a734686f | 54 | Requires: python-six >= 1.13.0 |
f2143082 | 55 | Suggests: polkit >= 0.94 |
de525aa7 | 56 | Conflicts: PolicyKit < 0.8-3 |
f858b052 | 57 | Conflicts: polkit < 0.94 |
de525aa7 ER |
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 | ||
cec4203b JB |
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 | ||
de525aa7 | 79 | %package gtk |
cec4203b JB |
80 | Summary: Code to make auto-wrapping GTK+ labels |
81 | Summary(pl.UTF-8): Kod do tworzenia automatycznie zawijanych etykiet GTK+ | |
de525aa7 ER |
82 | Group: Libraries |
83 | Requires: %{name} = %{version}-%{release} | |
cec4203b | 84 | Requires: python-pygtk-gtk >= 2:2 |
de525aa7 ER |
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 | |
cec4203b JB |
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. | |
de525aa7 | 100 | |
f2143082 JB |
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 | |
a734686f | 127 | Requires: python3-six >= 1.13.0 |
f2143082 JB |
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 | ||
de525aa7 ER |
153 | %prep |
154 | %setup -q | |
a734686f | 155 | %patch0 -p1 |
de525aa7 ER |
156 | |
157 | %build | |
f2143082 JB |
158 | %{__make} $(pwd)/setup.py |
159 | ||
160 | %if %{with python2} | |
5d94d357 | 161 | %py_build |
f2143082 JB |
162 | %endif |
163 | ||
164 | %if %{with python3} | |
5d94d357 | 165 | %py3_build |
f2143082 | 166 | %endif |
de525aa7 ER |
167 | |
168 | %install | |
169 | rm -rf $RPM_BUILD_ROOT | |
de525aa7 | 170 | |
f2143082 | 171 | %if %{with python2} |
5d94d357 | 172 | %py_install |
cec4203b | 173 | |
de525aa7 | 174 | %py_postclean |
f2143082 JB |
175 | %endif |
176 | ||
177 | %if %{with python3} | |
5d94d357 | 178 | %py3_install |
f2143082 JB |
179 | %endif |
180 | ||
181 | install -d $RPM_BUILD_ROOT%{_examplesdir} | |
182 | cp -pr doc/dbus/example $RPM_BUILD_ROOT%{_examplesdir}/%{name}-dbus-%{version} | |
de525aa7 ER |
183 | |
184 | %clean | |
185 | rm -rf $RPM_BUILD_ROOT | |
186 | ||
f2143082 | 187 | %if %{with python2} |
de525aa7 ER |
188 | %files |
189 | %defattr(644,root,root,755) | |
cec4203b | 190 | %doc AUTHORS |
de525aa7 ER |
191 | %dir %{py_sitescriptdir}/slip |
192 | %{py_sitescriptdir}/slip/__init__.py[co] | |
f858b052 | 193 | %{py_sitescriptdir}/slip/_wrappers |
de525aa7 | 194 | %{py_sitescriptdir}/slip/util |
f2143082 | 195 | %{py_sitescriptdir}/slip-%{version}-py*.egg-info |
de525aa7 ER |
196 | |
197 | %files dbus | |
198 | %defattr(644,root,root,755) | |
cec4203b | 199 | %doc doc/dbus/README |
de525aa7 | 200 | %{py_sitescriptdir}/slip/dbus |
f2143082 | 201 | %{py_sitescriptdir}/slip.dbus-%{version}-py*.egg-info |
cec4203b | 202 | %{_examplesdir}/%{name}-dbus-%{version} |
de525aa7 ER |
203 | |
204 | %files gtk | |
205 | %defattr(644,root,root,755) | |
206 | %{py_sitescriptdir}/slip/gtk | |
f2143082 JB |
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 | |
c4d6ca0b | 214 | %dir %{py3_sitescriptdir}/slip |
f2143082 JB |
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 |