]> git.pld-linux.org Git - packages/python-pygobject.git/blame - python-pygobject.spec
- release 10 (libffi 3.4.x)
[packages/python-pygobject.git] / python-pygobject.spec
CommitLineData
0a584574 1#
7a5831db
JB
2# Conditional build:
3%bcond_without python2 # Python 2.x module
d6a24715 4%bcond_with python3 # Python 3.x module
47361db5 5
0a584574 6%define module pygobject
0a584574 7Summary: Python bindings for GObject library
2cdd04b8 8Summary(pl.UTF-8): Wiązania Pythona do biblioteki GObject
0a584574 9Name: python-%{module}
5bec3d5a 10Version: 2.28.7
ab07dcf9 11Release: 10
e4e2e839 12License: LGPL v2+
0a584574 13Group: Libraries/Python
9587f86a 14Source0: https://download.gnome.org/sources/pygobject/2.28/%{module}-%{version}.tar.xz
5bec3d5a 15# Source0-md5: ae48b60c690c4aa894e69e0c97802745
21a966bd 16Patch0: %{name}-pc.patch
b02ddf04 17Patch1: %{name}-pyc.patch
ba5bf5ff 18Patch2: gio.patch
9587f86a 19URL: https://pygobject.readthedocs.io/
0a584574 20BuildRequires: autoconf >= 2.52
0ce6e377 21BuildRequires: automake >= 1:1.12.5
5a0f1c33 22BuildRequires: glib2-devel >= 1:2.24.0
c79d4059 23BuildRequires: gobject-introspection-devel >= 0.10.2
63b9ab8d 24BuildRequires: libffi-devel >= 3.0
0a584574 25BuildRequires: libtool
e4e2e839 26BuildRequires: libxslt-progs >= 1.1.22
c92dc8c2 27BuildRequires: pkgconfig
a1521d85 28BuildRequires: rpm-pythonprov
5a0f1c33
JB
29BuildRequires: tar >= 1:1.22
30BuildRequires: xz
a1521d85 31%if %{with python2}
a79efc8f 32BuildRequires: python-devel >= 1:2.5.2
5a0f1c33 33BuildRequires: python-pycairo-devel >= 1.2.0
47361db5 34Requires: python-modules
a1521d85
AF
35%endif
36%if %{with python3}
9587f86a
JB
37BuildRequires: python3 >= 1:3.2
38BuildRequires: python3-devel >= 1:3.2
39BuildRequires: python3-modules >= 1:3.2
c79d4059 40BuildRequires: python3-pycairo-devel >= 1.8.10
a1521d85 41%endif
5a0f1c33 42Requires: glib2 >= 1:2.24.0
80fcd2e7 43Requires: gobject-introspection >= 0.9.5
d0769ffd 44Provides: python-pygtk-gobject
9587f86a
JB
45Obsoletes: python-pygtk-glarea < 1:2.2.0
46Obsoletes: python-pygtk-gobject < 2:2.9.0
b02ddf04 47Conflicts: python-pygtk < 1:1.0
0a584574 48BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
49
eee09ad7 50# python provides Py* and _Py* symbols at runtime
e68a1bdc 51%define skip_post_check_so libpyglib-2.0-python[23]?.so.*
e3c2e3f2 52
0a584574 53%description
54Python bindings for GObject library.
55
1e5a13f0
JR
56%description -l pl.UTF-8
57Wiązania Pythona do biblioteki GObject.
0a584574 58
59%package devel
60Summary: Python bindings for GObject library
2cdd04b8 61Summary(pl.UTF-8): Wiązania Pythona do biblioteki GObject
0a584574 62Group: Development/Languages/Python
63Requires: %{name} = %{version}-%{release}
5a0f1c33 64Requires: glib2-devel >= 1:2.24.0
63b9ab8d 65Requires: libffi-devel >= 3.0
a79efc8f 66Requires: python-devel >= 1:2.5.2
0a584574 67
68%description devel
69This package contains files required to build wrappers for GObject
70addon libraries so that they interoperate with Python bindings.
71
1e5a13f0 72%description devel -l pl.UTF-8
0a584574 73Pakiet zawiera pliki wymagane do zbudowania funkcji do biblioteki
1e5a13f0 74GObject, tak by mogły te biblioteki kooperować z wiązaniami Pythona.
0a584574 75
ba5bf5ff
AF
76%package -n python3-pygobject
77Summary: Python 3.x bindings for GObject library
78Summary(pl.UTF-8): Wiązania Pythona 3.x do biblioteki GObject
79Group: Libraries/Python
80
81%description -n python3-pygobject
82Python 3.x bindings for GObject library.
83
ea043c53 84%description -n python3-pygobject -l pl.UTF-8
ba5bf5ff
AF
85Wiązania Pythona 3.x do biblioteki GObject.
86
c79d4059 87%package -n python3-pygobject-devel
88Summary: Python bindings for GObject library
89Summary(pl.UTF-8): Wiązania Pythona do biblioteki GObject
90Group: Development/Languages/Python
5a0f1c33 91Requires: glib2-devel >= 1:2.24.0
c79d4059 92Requires: libffi-devel >= 3.0
9587f86a 93Requires: python3-devel >= 1:3.2
c79d4059 94Requires: python3-pygobject = %{version}-%{release}
95
96%description -n python3-pygobject-devel
97This package contains files required to build wrappers for GObject
98addon libraries so that they interoperate with Python bindings.
99
100%description -n python3-pygobject-devel -l pl.UTF-8
101Pakiet zawiera pliki wymagane do zbudowania funkcji do biblioteki
102GObject, tak by mogły te biblioteki kooperować z wiązaniami Pythona.
103
0a584574 104%package examples
105Summary: Example programs for GObject library
2cdd04b8 106Summary(pl.UTF-8): Programy przykładowe dla biblioteki GObject
0a584574 107Group: Development/Languages/Python
108Requires: %{name}-devel = %{version}-%{release}
0a584574 109
110%description examples
111This package contains example programs for GObject library.
112
1e5a13f0
JR
113%description examples -l pl.UTF-8
114Ten pakiet zawiera przykładowe programy dla biblioteki GObject.
0a584574 115
e591eb27 116%package apidocs
117Summary: pygobject API documentation
2cdd04b8 118Summary(pl.UTF-8): Dokumentacja API pygobject
e591eb27 119Group: Documentation
120Requires: gtk-doc-common
47361db5 121BuildArch: noarch
e591eb27 122
123%description apidocs
124pygobject API documentation.
125
1e5a13f0 126%description apidocs -l pl.UTF-8
e591eb27 127Dokumentacja API pygobject.
128
0a584574 129%prep
130%setup -q -n %{module}-%{version}
21a966bd 131%patch0 -p1
b02ddf04 132%patch1 -p1
ba5bf5ff 133%patch2 -p1
0a584574 134
0a584574 135%build
136%{__libtoolize}
137%{__aclocal} -I m4
138%{__autoconf}
139%{__autoheader}
140%{__automake}
a1521d85 141%if %{with python3}
ba5bf5ff
AF
142mkdir py3
143cd py3
144../%configure \
145 PYTHON=/usr/bin/python3 \
cb2f161e 146 --disable-introspection \
ba5bf5ff 147 --disable-silent-rules
a1521d85 148%{__make}
ba5bf5ff 149cd ..
a1521d85
AF
150%endif
151%if %{with python2}
ba5bf5ff
AF
152mkdir py2
153cd py2
154../%configure \
155 PYTHON=%{__python} \
cb2f161e 156 --disable-introspection \
a79efc8f 157 --disable-silent-rules
a1521d85 158%{__make}
ba5bf5ff 159cd ..
a1521d85 160%endif
0a584574 161
162%install
163rm -rf $RPM_BUILD_ROOT
b02ddf04 164install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
0a584574 165
a1521d85 166%if %{with python3}
7a5831db 167%{__make} -C py3 -j 1 install \
133c66a8 168 DESTDIR=$RPM_BUILD_ROOT \
e4e2e839 169 TARGET_DIR=%{_gtkdocdir}/%{module}
a1521d85 170%endif
0ce6e377 171
a1521d85 172%if %{with python2}
7a5831db 173%{__make} -C py2 -j 1 install \
ba5bf5ff
AF
174 DESTDIR=$RPM_BUILD_ROOT \
175 TARGET_DIR=%{_gtkdocdir}/%{module}
a1521d85 176%endif
0a584574 177
b02ddf04 178cp -a examples/*.py $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
c8cce660 179
058710b2
JR
180%{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+python(\s|$),#!%{__python}\1,' \
181 $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/*.py
182
7badeb3a 183%{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la
b02ddf04 184
a1521d85 185%if %{with python2}
7badeb3a 186%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/{gtk-2.0/,}*/*.la
7c4a7622
AF
187%py_comp $RPM_BUILD_ROOT%{_datadir}/%{module}/2.0/codegen
188%py_ocomp $RPM_BUILD_ROOT%{_datadir}/%{module}/2.0/codegen
b02ddf04 189%py_postclean %{_datadir}/%{module}/2.0/codegen
a1521d85
AF
190%endif
191%if %{with python3}
7badeb3a 192%{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/*/*.la
a1521d85 193%endif
0a584574 194
195%clean
196rm -rf $RPM_BUILD_ROOT
197
2e6dab46 198%post -p /sbin/ldconfig
199%postun -p /sbin/ldconfig
200
a1521d85 201%if %{with python2}
0a584574 202%files
203%defattr(644,root,root,755)
204%doc AUTHORS ChangeLog NEWS README
0ce6e377
JB
205%attr(755,root,root) %{_libdir}/libpyglib-2.0-python2.so.*.*.*
206%attr(755,root,root) %ghost %{_libdir}/libpyglib-2.0-python2.so.0
0a584574 207%dir %{py_sitedir}/gtk-2.0
2e6dab46 208%dir %{py_sitedir}/gtk-2.0/gio
b02ddf04
MB
209%attr(755,root,root) %{py_sitedir}/gtk-2.0/gio/_gio.so
210%attr(755,root,root) %{py_sitedir}/gtk-2.0/gio/unix.so
2e6dab46 211%{py_sitedir}/gtk-2.0/gio/*.py[co]
c79d4059 212%dir %{py_sitedir}/glib
213%attr(755,root,root) %{py_sitedir}/glib/_glib.so
214%{py_sitedir}/glib/*.py[co]
215%dir %{py_sitedir}/gobject
216%attr(755,root,root) %{py_sitedir}/gobject/_gobject.so
217%{py_sitedir}/gobject/*.py[co]
0a584574 218%{py_sitedir}/gtk-2.0/*.py[co]
a79efc8f 219%{py_sitedir}/pygtk.py[co]
0a584574 220%{py_sitedir}/pygtk.pth
67b4ad40 221%dir %{_datadir}/%{module}
222%dir %{_datadir}/%{module}/xsl
0a584574 223
224%files devel
225%defattr(644,root,root,755)
b02ddf04 226%attr(755,root,root) %{_bindir}/pygobject-codegen-2.0
0ce6e377 227%attr(755,root,root) %{_libdir}/libpyglib-2.0-python2.so
0a584574 228%{_includedir}/pygtk-2.0
a79efc8f 229%{_pkgconfigdir}/pygobject-2.0.pc
b02ddf04
MB
230%dir %{_datadir}/%{module}/2.0
231%dir %{_datadir}/%{module}/2.0/codegen
232%{_datadir}/%{module}/2.0/codegen/*.py[co]
233%dir %{_datadir}/%{module}/2.0/defs
234%{_datadir}/%{module}/2.0/defs/*.defs
235%{_datadir}/%{module}/2.0/defs/*.override
eed9edcf 236%{_datadir}/%{module}/xsl/*.py
67b4ad40 237%{_datadir}/%{module}/xsl/*.xsl
a1521d85 238%endif
0a584574 239
a1521d85 240%if %{with python3}
ba5bf5ff
AF
241%files -n python3-pygobject
242%defattr(644,root,root,755)
243%doc AUTHORS ChangeLog NEWS README
0ce6e377
JB
244%attr(755,root,root) %{_libdir}/libpyglib-2.0-python3.so.*.*.*
245%attr(755,root,root) %ghost %{_libdir}/libpyglib-2.0-python3.so.0
ba5bf5ff
AF
246%dir %{py3_sitedir}/gtk-2.0
247%dir %{py3_sitedir}/gtk-2.0/gio
0ce6e377
JB
248%{py3_sitedir}/gtk-2.0/gio/*.py
249%{py3_sitedir}/gtk-2.0/gio/__pycache__
c79d4059 250%dir %{py3_sitedir}/glib
7e8fbfd7 251%attr(755,root,root) %{py3_sitedir}/glib/_glib.*so
0ce6e377
JB
252%{py3_sitedir}/glib/*.py
253%{py3_sitedir}/glib/__pycache__
c79d4059 254%dir %{py3_sitedir}/gobject
7e8fbfd7 255%attr(755,root,root) %{py3_sitedir}/gobject/_gobject.*so
0ce6e377
JB
256%{py3_sitedir}/gobject/*.py
257%{py3_sitedir}/gobject/__pycache__
258%{py3_sitedir}/gtk-2.0/*.py
259%{py3_sitedir}/gtk-2.0/__pycache__
260%{py3_sitedir}/pygtk.py
ba5bf5ff 261%{py3_sitedir}/pygtk.pth
0ce6e377 262%{py3_sitedir}/__pycache__
c79d4059 263
264%files -n python3-pygobject-devel
265%defattr(644,root,root,755)
0ce6e377 266%attr(755,root,root) %{_libdir}/libpyglib-2.0-python3.so
a1521d85 267%endif
c79d4059 268
0a584574 269%files examples
270%defattr(644,root,root,755)
271%{_examplesdir}/%{name}-%{version}
e591eb27 272
273%files apidocs
274%defattr(644,root,root,755)
19e038b8 275%{_gtkdocdir}/%{module}
This page took 0.124415 seconds and 4 git commands to generate.