]> git.pld-linux.org Git - packages/python-pygobject3.git/blame - python-pygobject3.spec
Update to 3.28.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
01f4a943 10Version: 3.28.1
8282c911 11Release: 1
a5fba226
AF
12License: LGPL v2+
13Group: Libraries/Python
8282c911 14Source0: http://ftp.gnome.org/pub/GNOME/sources/pygobject/3.24/%{module}-%{version}.tar.xz
01f4a943 15# Source0-md5: 612e9e2863d117d810e78672f7bc3ad6
f6b2e85a 16Patch0: link.patch
14d87b6a 17URL: https://wiki.gnome.org/Projects/PyGObject
decdeaaa 18BuildRequires: autoconf >= 2.68
b428bc6e 19BuildRequires: automake >= 1:1.12.6
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
badcdbca 24BuildRequires: gobject-introspection-devel >= 1.46.0
a5fba226 25BuildRequires: libffi-devel >= 3.0
7d22b890 26BuildRequires: libtool >= 2:2.2.6
a5fba226
AF
27BuildRequires: pkgconfig
28BuildRequires: rpm-pythonprov
29BuildRequires: tar >= 1:1.22
30BuildRequires: xz
31%if %{with python2}
205b0127 32BuildRequires: python-devel >= 1:2.7
01f4a943 33BuildRequires: python-pycairo-devel >= 1.11.1
a5fba226
AF
34%endif
35%if %{with python3}
b428bc6e
JB
36BuildRequires: python3 >= 1:3.2.2-3
37BuildRequires: python3-devel >= 1:3.2.2-3
38BuildRequires: python3-modules >= 1:3.2.2-3
01f4a943 39BuildRequires: python3-pycairo-devel >= 1.11.1
a5fba226 40%endif
e4d02b95 41Requires: glib2 >= 1:2.38.0
badcdbca 42Requires: gobject-introspection >= 1.46.0
eebd4be2 43Requires: python-modules >= 1:2.7
23ea25eb 44Conflicts: python-pygobject < 2.28.6-3
a5fba226
AF
45BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46
a5fba226
AF
47%description
48Python bindings for GObject library.
49
50%description -l pl.UTF-8
51Wiązania Pythona do biblioteki GObject.
52
3955a8b7
AF
53%package common-devel
54Summary: Python bindings for GObject library
55Summary(pl.UTF-8): Wiązania Pythona do biblioteki GObject
56Group: Development/Languages/Python
57Requires: %{name} = %{version}-%{release}
e4d02b95 58Requires: glib2-devel >= 1:2.38.0
3955a8b7
AF
59Requires: libffi-devel >= 3.0
60
d1050d12 61%description common-devel
538a43f0
ŁK
62This package contains headers files required to build wrappers for
63GObject addon libraries so that they interoperate with Python
3955a8b7
AF
64bindings.
65
d1050d12 66%description common-devel -l pl.UTF-8
538a43f0
ŁK
67Pakiet zawiera pliki nagłówkowe wymagane do zbudowania funkcji do
68biblioteki GObject, tak by mogły te biblioteki kooperowaći z
69wiązaniami Pythona.
3955a8b7 70
a5fba226 71%package devel
e4d02b95
JB
72Summary: Python 2 bindings for GObject library - development metapackage
73Summary(pl.UTF-8): Wiązania Pythona 2 do biblioteki GObject - metapakiet programistyczny
a5fba226
AF
74Group: Development/Languages/Python
75Requires: %{name} = %{version}-%{release}
3955a8b7 76Requires: %{name}-common-devel = %{version}-%{release}
e4d02b95 77Requires: glib2-devel >= 1:2.38.0
a5fba226 78Requires: libffi-devel >= 3.0
bebf1ce0 79Requires: python-devel >= 1:2.6
a5fba226
AF
80
81%description devel
e4d02b95
JB
82This metapackage gathers files required to develop GObject bindings
83for Python 2.
a5fba226
AF
84
85%description devel -l pl.UTF-8
e4d02b95
JB
86Ten metapakiet gromadzi pliki wymagane do tworzenia wiązań biblioteki
87GObject dla Pythona 2.
a5fba226
AF
88
89%package -n python3-pygobject3
90Summary: Python 3.x bindings for GObject library
91Summary(pl.UTF-8): Wiązania Pythona 3.x do biblioteki GObject
92Group: Libraries/Python
e4d02b95 93Requires: glib2 >= 1:2.38.0
badcdbca 94Requires: gobject-introspection >= 1.46.0
538a43f0 95Conflicts: python3-pygobject < 2.28.6-3
a5fba226
AF
96
97%description -n python3-pygobject3
98Python 3.x bindings for GObject library.
99
100%description -n python3-pygobject3 -l pl.UTF-8
101Wiązania Pythona 3.x do biblioteki GObject.
102
103%package -n python3-pygobject3-devel
e4d02b95
JB
104Summary: Python 3 bindings for GObject library - development metapackage
105Summary(pl.UTF-8): Wiązania Pythona 3 do biblioteki GObject - metapakiet programistyczny
a5fba226 106Group: Development/Languages/Python
538a43f0 107Requires: %{name}-common-devel = %{version}-%{release}
e4d02b95 108Requires: glib2-devel >= 1:2.38.0
a5fba226 109Requires: libffi-devel >= 3.0
b428bc6e 110Requires: python3-devel >= 1:3.2
97dc7172 111Requires: python3-pygobject3 = %{version}-%{release}
a5fba226
AF
112
113%description -n python3-pygobject3-devel
e4d02b95
JB
114This metapackage gathers files required to develop GObject bindings
115for Python 3.
a5fba226
AF
116
117%description -n python3-pygobject3-devel -l pl.UTF-8
e4d02b95
JB
118Ten metapakiet gromadzi pliki wymagane do tworzenia wiązań biblioteki
119GObject dla Pythona 3.
a5fba226
AF
120
121%package examples
122Summary: Example programs for GObject library
123Summary(pl.UTF-8): Programy przykładowe dla biblioteki GObject
124Group: Development/Languages/Python
125Requires: %{name}-devel = %{version}-%{release}
a5fba226
AF
126
127%description examples
128This package contains example programs for GObject library.
129
130%description examples -l pl.UTF-8
131Ten pakiet zawiera przykładowe programy dla biblioteki GObject.
132
a5fba226
AF
133%prep
134%setup -q -n %{module}-%{version}
f6b2e85a 135%patch0 -p1
a5fba226
AF
136
137%build
138%{__libtoolize}
139%{__aclocal} -I m4
140%{__autoconf}
141%{__autoheader}
142%{__automake}
143%if %{with python3}
144mkdir py3
145cd py3
146../%configure \
147 PYTHON=/usr/bin/python3 \
f6b2e85a 148 PYTHON_LIBS=-lpython3 \
eebd4be2
JB
149 --disable-silent-rules \
150 %{?with_python2:--without-common}
a5fba226
AF
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)
01f4a943 196%doc ChangeLog NEWS README.rst
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]
decdeaaa
ŁK
205%dir %{py_sitedir}/pygtkcompat
206%{py_sitedir}/pygtkcompat/*.py[co]
9cb81703 207%{py_sitedir}/pygobject-%{version}-py*.egg-info
a5fba226 208
3955a8b7 209%files common-devel
a5fba226 210%defattr(644,root,root,755)
a5fba226
AF
211%{_includedir}/pygobject-3.0
212%{_pkgconfigdir}/pygobject-3.0.pc
3955a8b7
AF
213
214%files devel
215%defattr(644,root,root,755)
a5fba226
AF
216%endif
217
218%if %{with python3}
219%files -n python3-pygobject3
220%defattr(644,root,root,755)
01f4a943 221%doc ChangeLog NEWS README.rst
a5fba226 222%dir %{py3_sitedir}/gi
205b0127
JB
223%attr(755,root,root) %{py3_sitedir}/gi/_gi.cpython*.so
224%attr(755,root,root) %{py3_sitedir}/gi/_gi_cairo.cpython*.so
7d22b890 225%{py3_sitedir}/gi/*.py
decdeaaa 226%{py3_sitedir}/gi/__pycache__
a5fba226 227%dir %{py3_sitedir}/gi/overrides
7d22b890 228%{py3_sitedir}/gi/overrides/*.py
decdeaaa 229%{py3_sitedir}/gi/overrides/__pycache__
a5fba226
AF
230%dir %{py3_sitedir}/gi/repository
231%{py3_sitedir}/gi/repository/*.py*
decdeaaa 232%{py3_sitedir}/gi/repository/__pycache__
decdeaaa 233%dir %{py3_sitedir}/pygtkcompat
7d22b890 234%{py3_sitedir}/pygtkcompat/*.py
decdeaaa 235%{py3_sitedir}/pygtkcompat/__pycache__
9cb81703 236%{py3_sitedir}/pygobject-%{version}-py*.egg-info
a5fba226
AF
237
238%files -n python3-pygobject3-devel
239%defattr(644,root,root,755)
a5fba226
AF
240%endif
241
242%files examples
243%defattr(644,root,root,755)
244%{_examplesdir}/%{name}-%{version}
This page took 0.159452 seconds and 4 git commands to generate.