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