]> git.pld-linux.org Git - packages/python-pygobject3.git/blob - python-pygobject3.spec
- updated to 3.16.1
[packages/python-pygobject3.git] / python-pygobject3.spec
1 #
2 # Conditional build:
3 %bcond_without  python2         # Python 2.x module
4 %bcond_without  python3         # Python 3.x module
5
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
10 Version:        3.16.1
11 Release:        1
12 License:        LGPL v2+
13 Group:          Libraries/Python
14 Source0:        http://ftp.gnome.org/pub/GNOME/sources/pygobject/3.16/%{module}-%{version}.tar.xz
15 # Source0-md5:  36bf04253d6b8999f238fd05ce9f8ac4
16 Patch0:         link.patch
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.39.0
25 BuildRequires:  libffi-devel >= 3.0
26 BuildRequires:  libtool >= 2:2.2.6
27 BuildRequires:  pkgconfig
28 BuildRequires:  pkgconfig(libffi) >= 3.0
29 BuildRequires:  rpm-pythonprov
30 BuildRequires:  tar >= 1:1.22
31 BuildRequires:  xz
32 %if %{with python2}
33 BuildRequires:  python-devel >= 1:2.7
34 BuildRequires:  python-pycairo-devel >= 1.2.0
35 Requires:       python-modules >= 1:2.7
36 %endif
37 %if %{with python3}
38 BuildRequires:  python3 >= 3.2.2-3
39 BuildRequires:  python3-devel >= 3.2.2-3
40 BuildRequires:  python3-modules >= 3.2.2-3
41 BuildRequires:  python3-pycairo-devel >= 1.10.0
42 %endif
43 Requires:       glib2 >= 1:2.38.0
44 Requires:       gobject-introspection >= 1.38.0
45 Conflicts:      python-pygobject < 2.28.6-3
46 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47
48 %description
49 Python bindings for GObject library.
50
51 %description -l pl.UTF-8
52 Wiązania Pythona do biblioteki GObject.
53
54 %package common-devel
55 Summary:        Python bindings for GObject library
56 Summary(pl.UTF-8):      Wiązania Pythona do biblioteki GObject
57 Group:          Development/Languages/Python
58 Requires:       %{name} = %{version}-%{release}
59 Requires:       glib2-devel >= 1:2.38.0
60 Requires:       libffi-devel >= 3.0
61
62 %description common-devel
63 This package contains headers files required to build wrappers for
64 GObject addon libraries so that they interoperate with Python
65 bindings.
66
67 %description common-devel -l pl.UTF-8
68 Pakiet zawiera pliki nagłówkowe wymagane do zbudowania funkcji do
69 biblioteki GObject, tak by mogły te biblioteki kooperowaći z
70 wiązaniami Pythona.
71
72 %package devel
73 Summary:        Python 2 bindings for GObject library - development metapackage
74 Summary(pl.UTF-8):      Wiązania Pythona 2 do biblioteki GObject - metapakiet programistyczny
75 Group:          Development/Languages/Python
76 Requires:       %{name} = %{version}-%{release}
77 Requires:       %{name}-common-devel = %{version}-%{release}
78 Requires:       glib2-devel >= 1:2.38.0
79 Requires:       libffi-devel >= 3.0
80 Requires:       python-devel >= 1:2.6
81
82 %description devel
83 This metapackage gathers files required to develop GObject bindings
84 for Python 2.
85
86 %description devel -l pl.UTF-8
87 Ten metapakiet gromadzi pliki wymagane do tworzenia wiązań biblioteki
88 GObject dla Pythona 2.
89
90 %package -n python3-pygobject3
91 Summary:        Python 3.x bindings for GObject library
92 Summary(pl.UTF-8):      Wiązania Pythona 3.x do biblioteki GObject
93 Group:          Libraries/Python
94 Requires:       glib2 >= 1:2.38.0
95 Requires:       gobject-introspection >= 1.39.0
96 Conflicts:      python3-pygobject < 2.28.6-3
97
98 %description -n python3-pygobject3
99 Python 3.x bindings for GObject library.
100
101 %description -n python3-pygobject3 -l pl.UTF-8
102 Wiązania Pythona 3.x do biblioteki GObject.
103
104 %package -n python3-pygobject3-devel
105 Summary:        Python 3 bindings for GObject library - development metapackage
106 Summary(pl.UTF-8):      Wiązania Pythona 3 do biblioteki GObject - metapakiet programistyczny
107 Group:          Development/Languages/Python
108 Requires:       %{name}-common-devel = %{version}-%{release}
109 Requires:       glib2-devel >= 1:2.38.0
110 Requires:       libffi-devel >= 3.0
111 Requires:       python3-devel >= 3.2
112 Requires:       python3-pygobject3 = %{version}-%{release}
113
114 %description -n python3-pygobject3-devel
115 This metapackage gathers files required to develop GObject bindings
116 for Python 3.
117
118 %description -n python3-pygobject3-devel -l pl.UTF-8
119 Ten metapakiet gromadzi pliki wymagane do tworzenia wiązań biblioteki
120 GObject dla Pythona 3.
121
122 %package examples
123 Summary:        Example programs for GObject library
124 Summary(pl.UTF-8):      Programy przykładowe dla biblioteki GObject
125 Group:          Development/Languages/Python
126 Requires:       %{name}-devel = %{version}-%{release}
127
128 %description examples
129 This package contains example programs for GObject library.
130
131 %description examples -l pl.UTF-8
132 Ten pakiet zawiera przykładowe programy dla biblioteki GObject.
133
134 %prep
135 %setup -q -n %{module}-%{version}
136 %patch0 -p1
137
138 %build
139 %{__libtoolize}
140 %{__aclocal} -I m4
141 %{__autoconf}
142 %{__autoheader}
143 %{__automake}
144 %if %{with python3}
145 mkdir py3
146 cd py3
147 ../%configure \
148         PYTHON=/usr/bin/python3 \
149         PYTHON_LIBS=-lpython3 \
150         --disable-silent-rules
151 %{__make}
152 cd ..
153 %endif
154 %if %{with python2}
155 mkdir py2
156 cd py2
157 ../%configure \
158         PYTHON=%{__python} \
159         PYTHON_LIBS=-lpython \
160         --disable-silent-rules
161 %{__make}
162 cd ..
163 %endif
164
165 %install
166 rm -rf $RPM_BUILD_ROOT
167 install -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
180 cp -a examples/*.py $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
181
182 %if %{with python2}
183 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/gi/*.la
184 %py_postclean
185 %endif
186 %if %{with python3}
187 %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/gi/*.la
188 %endif
189
190 %clean
191 rm -rf $RPM_BUILD_ROOT
192
193 %if %{with python2}
194 %files
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
210
211 %files common-devel
212 %defattr(644,root,root,755)
213 %{_includedir}/pygobject-3.0
214 %{_pkgconfigdir}/pygobject-3.0.pc
215
216 %files devel
217 %defattr(644,root,root,755)
218 %endif
219
220 %if %{with python3}
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
242
243 %files -n python3-pygobject3-devel
244 %defattr(644,root,root,755)
245 %endif
246
247 %files examples
248 %defattr(644,root,root,755)
249 %{_examplesdir}/%{name}-%{version}
This page took 0.103225 seconds and 3 git commands to generate.