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.28/%{module}-%{version}.tar.xz
15 # Source0-md5: 612e9e2863d117d810e78672f7bc3ad6
17 URL: https://wiki.gnome.org/Projects/PyGObject
18 BuildRequires: autoconf >= 2.68
19 BuildRequires: automake >= 1:1.12.6
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.11.1
36 BuildRequires: python3 >= 1:3.2.2-3
37 BuildRequires: python3-devel >= 1:3.2.2-3
38 BuildRequires: python3-modules >= 1:3.2.2-3
39 BuildRequires: python3-pycairo-devel >= 1.11.1
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 >= 1: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 ChangeLog NEWS README.rst
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}/pygtkcompat
206 %{py_sitedir}/pygtkcompat/*.py[co]
207 %{py_sitedir}/pygobject-%{version}-py*.egg-info
210 %defattr(644,root,root,755)
211 %{_includedir}/pygobject-3.0
212 %{_pkgconfigdir}/pygobject-3.0.pc
215 %defattr(644,root,root,755)
219 %files -n python3-pygobject3
220 %defattr(644,root,root,755)
221 %doc ChangeLog NEWS README.rst
222 %dir %{py3_sitedir}/gi
223 %attr(755,root,root) %{py3_sitedir}/gi/_gi.cpython*.so
224 %attr(755,root,root) %{py3_sitedir}/gi/_gi_cairo.cpython*.so
225 %{py3_sitedir}/gi/*.py
226 %{py3_sitedir}/gi/__pycache__
227 %dir %{py3_sitedir}/gi/overrides
228 %{py3_sitedir}/gi/overrides/*.py
229 %{py3_sitedir}/gi/overrides/__pycache__
230 %dir %{py3_sitedir}/gi/repository
231 %{py3_sitedir}/gi/repository/*.py*
232 %{py3_sitedir}/gi/repository/__pycache__
233 %dir %{py3_sitedir}/pygtkcompat
234 %{py3_sitedir}/pygtkcompat/*.py
235 %{py3_sitedir}/pygtkcompat/__pycache__
236 %{py3_sitedir}/pygobject-%{version}-py*.egg-info
238 %files -n python3-pygobject3-devel
239 %defattr(644,root,root,755)
243 %defattr(644,root,root,755)
244 %{_examplesdir}/%{name}-%{version}