]> git.pld-linux.org Git - packages/python-pygobject3.git/blob - python-pygobject3.spec
dda516b5898513d7d4ba1b4bfac078101434dc48
[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.28.1
11 Release:        1
12 License:        LGPL v2+
13 Group:          Libraries/Python
14 Source0:        http://ftp.gnome.org/pub/GNOME/sources/pygobject/3.28/%{module}-%{version}.tar.xz
15 # Source0-md5:  612e9e2863d117d810e78672f7bc3ad6
16 Patch0:         link.patch
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
30 BuildRequires:  xz
31 %if %{with python2}
32 BuildRequires:  python-devel >= 1:2.7
33 BuildRequires:  python-pycairo-devel >= 1.11.1
34 %endif
35 %if %{with python3}
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
40 %endif
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)
46
47 %description
48 Python bindings for GObject library.
49
50 %description -l pl.UTF-8
51 Wiązania Pythona do biblioteki GObject.
52
53 %package common-devel
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
60
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
64 bindings.
65
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
69 wiązaniami Pythona.
70
71 %package devel
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
80
81 %description devel
82 This metapackage gathers files required to develop GObject bindings
83 for Python 2.
84
85 %description devel -l pl.UTF-8
86 Ten metapakiet gromadzi pliki wymagane do tworzenia wiązań biblioteki
87 GObject dla Pythona 2.
88
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
96
97 %description -n python3-pygobject3
98 Python 3.x bindings for GObject library.
99
100 %description -n python3-pygobject3 -l pl.UTF-8
101 Wiązania Pythona 3.x do biblioteki GObject.
102
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}
112
113 %description -n python3-pygobject3-devel
114 This metapackage gathers files required to develop GObject bindings
115 for Python 3.
116
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.
120
121 %package examples
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}
126
127 %description examples
128 This package contains example programs for GObject library.
129
130 %description examples -l pl.UTF-8
131 Ten pakiet zawiera przykładowe programy dla biblioteki GObject.
132
133 %prep
134 %setup -q -n %{module}-%{version}
135 %patch0 -p1
136
137 %build
138 %{__libtoolize}
139 %{__aclocal} -I m4
140 %{__autoconf}
141 %{__autoheader}
142 %{__automake}
143 %if %{with python3}
144 mkdir py3
145 cd py3
146 ../%configure \
147         PYTHON=/usr/bin/python3 \
148         PYTHON_LIBS=-lpython3 \
149         --disable-silent-rules \
150         %{?with_python2:--without-common}
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 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
208
209 %files common-devel
210 %defattr(644,root,root,755)
211 %{_includedir}/pygobject-3.0
212 %{_pkgconfigdir}/pygobject-3.0.pc
213
214 %files devel
215 %defattr(644,root,root,755)
216 %endif
217
218 %if %{with python3}
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
237
238 %files -n python3-pygobject3-devel
239 %defattr(644,root,root,755)
240 %endif
241
242 %files examples
243 %defattr(644,root,root,755)
244 %{_examplesdir}/%{name}-%{version}
This page took 1.210649 seconds and 2 git commands to generate.