]> git.pld-linux.org Git - packages/python-pygobject3.git/blame - python-pygobject3.spec
Update to 3.12.1
[packages/python-pygobject3.git] / python-pygobject3.spec
CommitLineData
a5fba226
AF
1#
2# Conditional build:
3%bcond_without python2 # Python 2.x module
4%bcond_without python3 # Python 3.x module
63e1dd2b 5
a5fba226 6%define module pygobject
a5fba226
AF
7Summary: Python bindings for GObject library
8Summary(pl.UTF-8): Wiązania Pythona do biblioteki GObject
7d22b890 9Name: python-pygobject3
7d295c36 10Version: 3.12.1
26d401ad 11Release: 1
a5fba226
AF
12License: LGPL v2+
13Group: Libraries/Python
e4d02b95 14Source0: http://ftp.gnome.org/pub/GNOME/sources/pygobject/3.12/%{module}-%{version}.tar.xz
7d295c36 15# Source0-md5: 8608682f221feaac81adb3f4e40dbef3
f6b2e85a 16Patch0: link.patch
7d22b890 17URL: https://live.gnome.org/PyGObject
decdeaaa
ŁK
18BuildRequires: autoconf >= 2.68
19BuildRequires: automake >= 1:1.11.1
7d22b890 20%{?with_python3:BuildRequires: automake >= 1:1.13}
590b40c5 21BuildRequires: cairo-gobject-devel
e4d02b95 22BuildRequires: glib2-devel >= 1:2.38.0
e1e13d0e 23BuildRequires: gnome-common >= 3.10
e4d02b95 24BuildRequires: gobject-introspection-devel >= 1.38.0
a5fba226 25BuildRequires: libffi-devel >= 3.0
7d22b890 26BuildRequires: libtool >= 2:2.2.6
a5fba226 27BuildRequires: pkgconfig
81604870 28BuildRequires: pkgconfig(libffi) >= 3.0
a5fba226
AF
29BuildRequires: rpm-pythonprov
30BuildRequires: tar >= 1:1.22
31BuildRequires: xz
32%if %{with python2}
205b0127 33BuildRequires: python-devel >= 1:2.7
a5fba226 34BuildRequires: python-pycairo-devel >= 1.2.0
205b0127 35Requires: python-modules >= 1:2.7
a5fba226
AF
36%endif
37%if %{with python3}
f6b2e85a
AF
38BuildRequires: python3 >= 3.2.2-3
39BuildRequires: python3-devel >= 3.2.2-3
40BuildRequires: python3-modules >= 3.2.2-3
3955a8b7 41BuildRequires: python3-pycairo-devel >= 1.10.0
a5fba226 42%endif
e4d02b95
JB
43Requires: glib2 >= 1:2.38.0
44Requires: gobject-introspection >= 1.38.0
23ea25eb 45Conflicts: python-pygobject < 2.28.6-3
a5fba226
AF
46BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47
a5fba226
AF
48%description
49Python bindings for GObject library.
50
51%description -l pl.UTF-8
52Wiązania Pythona do biblioteki GObject.
53
3955a8b7
AF
54%package common-devel
55Summary: Python bindings for GObject library
56Summary(pl.UTF-8): Wiązania Pythona do biblioteki GObject
57Group: Development/Languages/Python
58Requires: %{name} = %{version}-%{release}
e4d02b95 59Requires: glib2-devel >= 1:2.38.0
3955a8b7
AF
60Requires: libffi-devel >= 3.0
61
d1050d12 62%description common-devel
538a43f0
ŁK
63This package contains headers files required to build wrappers for
64GObject addon libraries so that they interoperate with Python
3955a8b7
AF
65bindings.
66
d1050d12 67%description common-devel -l pl.UTF-8
538a43f0
ŁK
68Pakiet zawiera pliki nagłówkowe wymagane do zbudowania funkcji do
69biblioteki GObject, tak by mogły te biblioteki kooperowaći z
70wiązaniami Pythona.
3955a8b7 71
a5fba226 72%package devel
e4d02b95
JB
73Summary: Python 2 bindings for GObject library - development metapackage
74Summary(pl.UTF-8): Wiązania Pythona 2 do biblioteki GObject - metapakiet programistyczny
a5fba226
AF
75Group: Development/Languages/Python
76Requires: %{name} = %{version}-%{release}
3955a8b7 77Requires: %{name}-common-devel = %{version}-%{release}
e4d02b95 78Requires: glib2-devel >= 1:2.38.0
a5fba226 79Requires: libffi-devel >= 3.0
bebf1ce0 80Requires: python-devel >= 1:2.6
a5fba226
AF
81
82%description devel
e4d02b95
JB
83This metapackage gathers files required to develop GObject bindings
84for Python 2.
a5fba226
AF
85
86%description devel -l pl.UTF-8
e4d02b95
JB
87Ten metapakiet gromadzi pliki wymagane do tworzenia wiązań biblioteki
88GObject dla Pythona 2.
a5fba226
AF
89
90%package -n python3-pygobject3
91Summary: Python 3.x bindings for GObject library
92Summary(pl.UTF-8): Wiązania Pythona 3.x do biblioteki GObject
93Group: Libraries/Python
e4d02b95
JB
94Requires: glib2 >= 1:2.38.0
95Requires: gobject-introspection >= 1.38.0
538a43f0 96Conflicts: python3-pygobject < 2.28.6-3
a5fba226
AF
97
98%description -n python3-pygobject3
99Python 3.x bindings for GObject library.
100
101%description -n python3-pygobject3 -l pl.UTF-8
102Wiązania Pythona 3.x do biblioteki GObject.
103
104%package -n python3-pygobject3-devel
e4d02b95
JB
105Summary: Python 3 bindings for GObject library - development metapackage
106Summary(pl.UTF-8): Wiązania Pythona 3 do biblioteki GObject - metapakiet programistyczny
a5fba226 107Group: Development/Languages/Python
538a43f0 108Requires: %{name}-common-devel = %{version}-%{release}
e4d02b95 109Requires: glib2-devel >= 1:2.38.0
a5fba226 110Requires: libffi-devel >= 3.0
decdeaaa 111Requires: python3-devel >= 3.2
97dc7172 112Requires: python3-pygobject3 = %{version}-%{release}
a5fba226
AF
113
114%description -n python3-pygobject3-devel
e4d02b95
JB
115This metapackage gathers files required to develop GObject bindings
116for Python 3.
a5fba226
AF
117
118%description -n python3-pygobject3-devel -l pl.UTF-8
e4d02b95
JB
119Ten metapakiet gromadzi pliki wymagane do tworzenia wiązań biblioteki
120GObject dla Pythona 3.
a5fba226
AF
121
122%package examples
123Summary: Example programs for GObject library
124Summary(pl.UTF-8): Programy przykładowe dla biblioteki GObject
125Group: Development/Languages/Python
126Requires: %{name}-devel = %{version}-%{release}
a5fba226
AF
127
128%description examples
129This package contains example programs for GObject library.
130
131%description examples -l pl.UTF-8
132Ten pakiet zawiera przykładowe programy dla biblioteki GObject.
133
a5fba226
AF
134%prep
135%setup -q -n %{module}-%{version}
f6b2e85a 136%patch0 -p1
a5fba226
AF
137
138%build
139%{__libtoolize}
140%{__aclocal} -I m4
141%{__autoconf}
142%{__autoheader}
143%{__automake}
144%if %{with python3}
145mkdir py3
146cd py3
147../%configure \
148 PYTHON=/usr/bin/python3 \
f6b2e85a 149 PYTHON_LIBS=-lpython3 \
a5fba226
AF
150 --disable-silent-rules
151%{__make}
152cd ..
153%endif
154%if %{with python2}
155mkdir py2
156cd py2
157../%configure \
158 PYTHON=%{__python} \
f6b2e85a 159 PYTHON_LIBS=-lpython \
a5fba226
AF
160 --disable-silent-rules
161%{__make}
162cd ..
163%endif
164
165%install
166rm -rf $RPM_BUILD_ROOT
167install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
168
169%if %{with python3}
170%{__make} -C py3 -j 1 install \
171 DESTDIR=$RPM_BUILD_ROOT \
172 TARGET_DIR=%{_gtkdocdir}/%{module}
173%endif
174%if %{with python2}
175%{__make} -C py2 -j 1 install \
176 DESTDIR=$RPM_BUILD_ROOT \
177 TARGET_DIR=%{_gtkdocdir}/%{module}
178%endif
179
180cp -a examples/*.py $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
181
a5fba226 182%if %{with python2}
e4d02b95 183%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/gi/*.la
e9ba7e96 184%py_postclean
a5fba226
AF
185%endif
186%if %{with python3}
e4d02b95 187%{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/gi/*.la
a5fba226
AF
188%endif
189
190%clean
191rm -rf $RPM_BUILD_ROOT
192
a5fba226
AF
193%if %{with python2}
194%files
195%defattr(644,root,root,755)
196%doc AUTHORS ChangeLog NEWS README
a5fba226 197%dir %{py_sitedir}/gi
decdeaaa
ŁK
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]
a5fba226
AF
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]
a5fba226 205%dir %{py_sitedir}/gi/_gobject
a5fba226 206%{py_sitedir}/gi/_gobject/*.py[co]
decdeaaa
ŁK
207%dir %{py_sitedir}/pygtkcompat
208%{py_sitedir}/pygtkcompat/*.py[co]
9cb81703 209%{py_sitedir}/pygobject-%{version}-py*.egg-info
a5fba226 210
3955a8b7 211%files common-devel
a5fba226 212%defattr(644,root,root,755)
a5fba226
AF
213%{_includedir}/pygobject-3.0
214%{_pkgconfigdir}/pygobject-3.0.pc
3955a8b7
AF
215
216%files devel
217%defattr(644,root,root,755)
a5fba226
AF
218%endif
219
220%if %{with python3}
221%files -n python3-pygobject3
222%defattr(644,root,root,755)
223%doc AUTHORS ChangeLog NEWS README
a5fba226 224%dir %{py3_sitedir}/gi
205b0127
JB
225%attr(755,root,root) %{py3_sitedir}/gi/_gi.cpython*.so
226%attr(755,root,root) %{py3_sitedir}/gi/_gi_cairo.cpython*.so
7d22b890 227%{py3_sitedir}/gi/*.py
decdeaaa 228%{py3_sitedir}/gi/__pycache__
7d22b890 229%dir %{py3_sitedir}/gi/_gobject
7d22b890
JB
230%{py3_sitedir}/gi/_gobject/*.py
231%{py3_sitedir}/gi/_gobject/__pycache__
a5fba226 232%dir %{py3_sitedir}/gi/overrides
7d22b890 233%{py3_sitedir}/gi/overrides/*.py
decdeaaa 234%{py3_sitedir}/gi/overrides/__pycache__
a5fba226
AF
235%dir %{py3_sitedir}/gi/repository
236%{py3_sitedir}/gi/repository/*.py*
decdeaaa 237%{py3_sitedir}/gi/repository/__pycache__
decdeaaa 238%dir %{py3_sitedir}/pygtkcompat
7d22b890 239%{py3_sitedir}/pygtkcompat/*.py
decdeaaa 240%{py3_sitedir}/pygtkcompat/__pycache__
9cb81703 241%{py3_sitedir}/pygobject-%{version}-py*.egg-info
a5fba226
AF
242
243%files -n python3-pygobject3-devel
244%defattr(644,root,root,755)
a5fba226
AF
245%endif
246
247%files examples
248%defattr(644,root,root,755)
249%{_examplesdir}/%{name}-%{version}
This page took 0.140566 seconds and 4 git commands to generate.