3 %bcond_without python2 # Python 2.x module
4 %bcond_without python3 # Python 3.x module
6 %define module pygobject
7 Summary: Python bindings for GObject library
8 Summary(pl.UTF-8): Wiązania Pythona do biblioteki GObject
9 Name: python-pygobject3
13 Group: Libraries/Python
14 Source0: http://ftp.gnome.org/pub/GNOME/sources/pygobject/3.20/%{module}-%{version}.tar.xz
15 # Source0-md5: ebb9e5c75ff6405a4f6d017a5766c205
17 URL: https://wiki.gnome.org/Projects/PyGObject
18 BuildRequires: autoconf >= 2.68
19 BuildRequires: automake >= 1:1.11.1
20 %{?with_python3:BuildRequires: automake >= 1:1.13}
21 BuildRequires: cairo-gobject-devel
22 BuildRequires: glib2-devel >= 1:2.38.0
23 BuildRequires: gnome-common >= 3.10
24 BuildRequires: gobject-introspection-devel >= 1.46.0
25 BuildRequires: libffi-devel >= 3.0
26 BuildRequires: libtool >= 2:2.2.6
27 BuildRequires: pkgconfig
28 BuildRequires: rpm-pythonprov
29 BuildRequires: tar >= 1:1.22
32 BuildRequires: python-devel >= 1:2.7
33 BuildRequires: python-pycairo-devel >= 1.2.0
36 BuildRequires: python3 >= 3.2.2-3
37 BuildRequires: python3-devel >= 3.2.2-3
38 BuildRequires: python3-modules >= 3.2.2-3
39 BuildRequires: python3-pycairo-devel >= 1.10.0
41 Requires: glib2 >= 1:2.38.0
42 Requires: gobject-introspection >= 1.46.0
43 Requires: python-modules >= 1:2.7
44 Conflicts: python-pygobject < 2.28.6-3
45 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
48 Python bindings for GObject library.
50 %description -l pl.UTF-8
51 Wiązania Pythona do biblioteki GObject.
54 Summary: Python bindings for GObject library
55 Summary(pl.UTF-8): Wiązania Pythona do biblioteki GObject
56 Group: Development/Languages/Python
57 Requires: %{name} = %{version}-%{release}
58 Requires: glib2-devel >= 1:2.38.0
59 Requires: libffi-devel >= 3.0
61 %description common-devel
62 This package contains headers files required to build wrappers for
63 GObject addon libraries so that they interoperate with Python
66 %description common-devel -l pl.UTF-8
67 Pakiet zawiera pliki nagłówkowe wymagane do zbudowania funkcji do
68 biblioteki GObject, tak by mogły te biblioteki kooperowaći z
72 Summary: Python 2 bindings for GObject library - development metapackage
73 Summary(pl.UTF-8): Wiązania Pythona 2 do biblioteki GObject - metapakiet programistyczny
74 Group: Development/Languages/Python
75 Requires: %{name} = %{version}-%{release}
76 Requires: %{name}-common-devel = %{version}-%{release}
77 Requires: glib2-devel >= 1:2.38.0
78 Requires: libffi-devel >= 3.0
79 Requires: python-devel >= 1:2.6
82 This metapackage gathers files required to develop GObject bindings
85 %description devel -l pl.UTF-8
86 Ten metapakiet gromadzi pliki wymagane do tworzenia wiązań biblioteki
87 GObject dla Pythona 2.
89 %package -n python3-pygobject3
90 Summary: Python 3.x bindings for GObject library
91 Summary(pl.UTF-8): Wiązania Pythona 3.x do biblioteki GObject
92 Group: Libraries/Python
93 Requires: glib2 >= 1:2.38.0
94 Requires: gobject-introspection >= 1.46.0
95 Conflicts: python3-pygobject < 2.28.6-3
97 %description -n python3-pygobject3
98 Python 3.x bindings for GObject library.
100 %description -n python3-pygobject3 -l pl.UTF-8
101 Wiązania Pythona 3.x do biblioteki GObject.
103 %package -n python3-pygobject3-devel
104 Summary: Python 3 bindings for GObject library - development metapackage
105 Summary(pl.UTF-8): Wiązania Pythona 3 do biblioteki GObject - metapakiet programistyczny
106 Group: Development/Languages/Python
107 Requires: %{name}-common-devel = %{version}-%{release}
108 Requires: glib2-devel >= 1:2.38.0
109 Requires: libffi-devel >= 3.0
110 Requires: python3-devel >= 3.2
111 Requires: python3-pygobject3 = %{version}-%{release}
113 %description -n python3-pygobject3-devel
114 This metapackage gathers files required to develop GObject bindings
117 %description -n python3-pygobject3-devel -l pl.UTF-8
118 Ten metapakiet gromadzi pliki wymagane do tworzenia wiązań biblioteki
119 GObject dla Pythona 3.
122 Summary: Example programs for GObject library
123 Summary(pl.UTF-8): Programy przykładowe dla biblioteki GObject
124 Group: Development/Languages/Python
125 Requires: %{name}-devel = %{version}-%{release}
127 %description examples
128 This package contains example programs for GObject library.
130 %description examples -l pl.UTF-8
131 Ten pakiet zawiera przykładowe programy dla biblioteki GObject.
134 %setup -q -n %{module}-%{version}
147 PYTHON=/usr/bin/python3 \
148 PYTHON_LIBS=-lpython3 \
149 --disable-silent-rules \
150 %{?with_python2:--without-common}
159 PYTHON_LIBS=-lpython \
160 --disable-silent-rules
166 rm -rf $RPM_BUILD_ROOT
167 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
170 %{__make} -C py3 -j 1 install \
171 DESTDIR=$RPM_BUILD_ROOT \
172 TARGET_DIR=%{_gtkdocdir}/%{module}
175 %{__make} -C py2 -j 1 install \
176 DESTDIR=$RPM_BUILD_ROOT \
177 TARGET_DIR=%{_gtkdocdir}/%{module}
180 cp -a examples/*.py $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
183 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/gi/*.la
187 %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/gi/*.la
191 rm -rf $RPM_BUILD_ROOT
195 %defattr(644,root,root,755)
196 %doc AUTHORS ChangeLog NEWS README
197 %dir %{py_sitedir}/gi
198 %attr(755,root,root) %{py_sitedir}/gi/_gi.so
199 %attr(755,root,root) %{py_sitedir}/gi/_gi_cairo.so
200 %{py_sitedir}/gi/*.py[co]
201 %dir %{py_sitedir}/gi/overrides
202 %{py_sitedir}/gi/overrides/*.py[co]
203 %dir %{py_sitedir}/gi/repository
204 %{py_sitedir}/gi/repository/*.py[co]
205 %dir %{py_sitedir}/gi/_gobject
206 %{py_sitedir}/gi/_gobject/*.py[co]
207 %dir %{py_sitedir}/pygtkcompat
208 %{py_sitedir}/pygtkcompat/*.py[co]
209 %{py_sitedir}/pygobject-%{version}-py*.egg-info
212 %defattr(644,root,root,755)
213 %{_includedir}/pygobject-3.0
214 %{_pkgconfigdir}/pygobject-3.0.pc
217 %defattr(644,root,root,755)
221 %files -n python3-pygobject3
222 %defattr(644,root,root,755)
223 %doc AUTHORS ChangeLog NEWS README
224 %dir %{py3_sitedir}/gi
225 %attr(755,root,root) %{py3_sitedir}/gi/_gi.cpython*.so
226 %attr(755,root,root) %{py3_sitedir}/gi/_gi_cairo.cpython*.so
227 %{py3_sitedir}/gi/*.py
228 %{py3_sitedir}/gi/__pycache__
229 %dir %{py3_sitedir}/gi/_gobject
230 %{py3_sitedir}/gi/_gobject/*.py
231 %{py3_sitedir}/gi/_gobject/__pycache__
232 %dir %{py3_sitedir}/gi/overrides
233 %{py3_sitedir}/gi/overrides/*.py
234 %{py3_sitedir}/gi/overrides/__pycache__
235 %dir %{py3_sitedir}/gi/repository
236 %{py3_sitedir}/gi/repository/*.py*
237 %{py3_sitedir}/gi/repository/__pycache__
238 %dir %{py3_sitedir}/pygtkcompat
239 %{py3_sitedir}/pygtkcompat/*.py
240 %{py3_sitedir}/pygtkcompat/__pycache__
241 %{py3_sitedir}/pygobject-%{version}-py*.egg-info
243 %files -n python3-pygobject3-devel
244 %defattr(644,root,root,755)
248 %defattr(644,root,root,755)
249 %{_examplesdir}/%{name}-%{version}