]> git.pld-linux.org Git - packages/python-pygobject3.git/blob - python-pygobject3.spec
- up to 3.33.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 %bcond_without  doc             # Sphinx documentation
6 %bcond_with     tests           # unit tests (fail at the beginning as of 3.30.1)
7
8 %define         module  pygobject
9 Summary:        Python bindings for GObject library
10 Summary(pl.UTF-8):      Wiązania Pythona do biblioteki GObject
11 Name:           python-pygobject3
12 Version:        3.33.1
13 Release:        1
14 License:        LGPL v2+
15 Group:          Libraries/Python
16 Source0:        http://ftp.gnome.org/pub/GNOME/sources/pygobject/3.33/%{module}-%{version}.tar.xz
17 # Source0-md5:  8aef43815361d93916532cc571676e80
18 URL:            https://wiki.gnome.org/Projects/PyGObject
19 BuildRequires:  cairo-gobject-devel
20 BuildRequires:  glib2-devel >= 1:2.48.0
21 BuildRequires:  gobject-introspection-devel >= 1.46.0
22 BuildRequires:  libffi-devel >= 3.0
23 BuildRequires:  pkgconfig
24 BuildRequires:  rpm-pythonprov
25 %{?with_doc:BuildRequires:      sphinx-pdg}
26 BuildRequires:  tar >= 1:1.22
27 BuildRequires:  xz
28 %if %{with python2}
29 BuildRequires:  python-devel >= 1:2.7
30 BuildRequires:  python-pycairo-devel >= 1.11.1
31 BuildRequires:  python-setuptools
32 %if %{with tests}
33 BuildRequires:  python-pytest
34 %endif
35 %endif
36 %if %{with python3}
37 BuildRequires:  python3 >= 1:3.5
38 BuildRequires:  python3-devel >= 1:3.5
39 BuildRequires:  python3-modules >= 1:3.5
40 BuildRequires:  python3-pycairo-devel >= 1.11.1
41 BuildRequires:  python3-setuptools
42 %if %{with tests}
43 BuildRequires:  python3-pytest
44 %endif
45 %endif
46 Requires:       glib2 >= 1:2.48.0
47 Requires:       gobject-introspection >= 1.46.0
48 Requires:       python-modules >= 1:2.7
49 Conflicts:      python-pygobject < 2.28.6-3
50 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
51
52 %description
53 Python bindings for GObject library.
54
55 %description -l pl.UTF-8
56 Wiązania Pythona do biblioteki GObject.
57
58 %package common-devel
59 Summary:        Python bindings for GObject library
60 Summary(pl.UTF-8):      Wiązania Pythona do biblioteki GObject
61 Group:          Development/Languages/Python
62 Requires:       %{name} = %{version}-%{release}
63 Requires:       glib2-devel >= 1:2.48.0
64 Requires:       libffi-devel >= 3.0
65
66 %description common-devel
67 This package contains headers files required to build wrappers for
68 GObject addon libraries so that they interoperate with Python
69 bindings.
70
71 %description common-devel -l pl.UTF-8
72 Pakiet zawiera pliki nagłówkowe wymagane do zbudowania funkcji do
73 biblioteki GObject, tak by mogły te biblioteki kooperowaći z
74 wiązaniami Pythona.
75
76 %package devel
77 Summary:        Python 2 bindings for GObject library - development metapackage
78 Summary(pl.UTF-8):      Wiązania Pythona 2 do biblioteki GObject - metapakiet programistyczny
79 Group:          Development/Languages/Python
80 Requires:       %{name} = %{version}-%{release}
81 Requires:       %{name}-common-devel = %{version}-%{release}
82 Requires:       glib2-devel >= 1:2.48.0
83 Requires:       libffi-devel >= 3.0
84 Requires:       python-devel >= 1:2.7
85
86 %description devel
87 This metapackage gathers files required to develop GObject bindings
88 for Python 2.
89
90 %description devel -l pl.UTF-8
91 Ten metapakiet gromadzi pliki wymagane do tworzenia wiązań biblioteki
92 GObject dla Pythona 2.
93
94 %package -n python3-pygobject3
95 Summary:        Python 3.x bindings for GObject library
96 Summary(pl.UTF-8):      Wiązania Pythona 3.x do biblioteki GObject
97 Group:          Libraries/Python
98 Requires:       glib2 >= 1:2.48.0
99 Requires:       gobject-introspection >= 1.46.0
100 Conflicts:      python3-pygobject < 2.28.6-3
101
102 %description -n python3-pygobject3
103 Python 3.x bindings for GObject library.
104
105 %description -n python3-pygobject3 -l pl.UTF-8
106 Wiązania Pythona 3.x do biblioteki GObject.
107
108 %package -n python3-pygobject3-devel
109 Summary:        Python 3 bindings for GObject library - development metapackage
110 Summary(pl.UTF-8):      Wiązania Pythona 3 do biblioteki GObject - metapakiet programistyczny
111 Group:          Development/Languages/Python
112 Requires:       %{name}-common-devel = %{version}-%{release}
113 Requires:       glib2-devel >= 1:2.48.0
114 Requires:       libffi-devel >= 3.0
115 Requires:       python3-devel >= 1:3.5
116 Requires:       python3-pygobject3 = %{version}-%{release}
117
118 %description -n python3-pygobject3-devel
119 This metapackage gathers files required to develop GObject bindings
120 for Python 3.
121
122 %description -n python3-pygobject3-devel -l pl.UTF-8
123 Ten metapakiet gromadzi pliki wymagane do tworzenia wiązań biblioteki
124 GObject dla Pythona 3.
125
126 %package apidocs
127 Summary:        API documentation for Python GObject library
128 Summary(pl.UTF-8):      Dokumentacja biblioteki Pythona GObject
129 Group:          Documentation
130 %if "%{_rpmversion}" >= "5"
131 BuildArch:      noarch
132 %endif
133
134 %description apidocs
135 API documentation for Python GObject library.
136
137 %description apidocs -l pl.UTF-8
138 Dokumentacja biblioteki Pythona GObject.
139
140 %package examples
141 Summary:        Example programs for GObject library
142 Summary(pl.UTF-8):      Programy przykładowe dla biblioteki GObject
143 Group:          Development/Languages/Python
144 Requires:       %{name}-devel = %{version}-%{release}
145 %if "%{_rpmversion}" >= "5"
146 BuildArch:      noarch
147 %endif
148
149 %description examples
150 This package contains example programs for GObject library.
151
152 %description examples -l pl.UTF-8
153 Ten pakiet zawiera przykładowe programy dla biblioteki GObject.
154
155 %prep
156 %setup -q -n %{module}-%{version}
157
158 %build
159 %if %{with python2}
160 %py_build %{?with_tests:test}
161 %endif
162
163 %if %{with python3}
164 %py3_build %{?with_tests:test}
165 %endif
166
167 %if %{with doc}
168 %{__make} -C docs
169 %endif
170
171 %install
172 rm -rf $RPM_BUILD_ROOT
173 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
174
175 %if %{with python2}
176 %py_install
177
178 %py_postclean
179 %endif
180
181 %if %{with python3}
182 %py3_install
183 %endif
184
185 cp -a examples/*.py $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
186
187 %clean
188 rm -rf $RPM_BUILD_ROOT
189
190 %if %{with python2}
191 %files
192 %defattr(644,root,root,755)
193 %doc NEWS README.rst
194 %dir %{py_sitedir}/gi
195 %attr(755,root,root) %{py_sitedir}/gi/_gi.so
196 %attr(755,root,root) %{py_sitedir}/gi/_gi_cairo.so
197 %{py_sitedir}/gi/*.py[co]
198 %dir %{py_sitedir}/gi/overrides
199 %{py_sitedir}/gi/overrides/*.py[co]
200 %dir %{py_sitedir}/gi/repository
201 %{py_sitedir}/gi/repository/*.py[co]
202 %dir %{py_sitedir}/pygtkcompat
203 %{py_sitedir}/pygtkcompat/*.py[co]
204 %{py_sitedir}/PyGObject-%{version}-py*.egg-info
205
206 %files common-devel
207 %defattr(644,root,root,755)
208 %{_includedir}/pygobject-3.0
209 %{_pkgconfigdir}/pygobject-3.0.pc
210
211 %files devel
212 %defattr(644,root,root,755)
213 %endif
214
215 %if %{with python3}
216 %files -n python3-pygobject3
217 %defattr(644,root,root,755)
218 %doc NEWS README.rst
219 %dir %{py3_sitedir}/gi
220 %attr(755,root,root) %{py3_sitedir}/gi/_gi.cpython*.so
221 %attr(755,root,root) %{py3_sitedir}/gi/_gi_cairo.cpython*.so
222 %{py3_sitedir}/gi/*.py
223 %{py3_sitedir}/gi/__pycache__
224 %dir %{py3_sitedir}/gi/overrides
225 %{py3_sitedir}/gi/overrides/*.py
226 %{py3_sitedir}/gi/overrides/__pycache__
227 %dir %{py3_sitedir}/gi/repository
228 %{py3_sitedir}/gi/repository/*.py*
229 %{py3_sitedir}/gi/repository/__pycache__
230 %dir %{py3_sitedir}/pygtkcompat
231 %{py3_sitedir}/pygtkcompat/*.py
232 %{py3_sitedir}/pygtkcompat/__pycache__
233 %{py3_sitedir}/PyGObject-%{version}-py*.egg-info
234
235 %files -n python3-pygobject3-devel
236 %defattr(644,root,root,755)
237 %endif
238
239 %if %{with doc}
240 %files apidocs
241 %defattr(644,root,root,755)
242 %doc docs/_build/{_images,_static,devguide,guide,*.html,*.js}
243 %endif
244
245 %files examples
246 %defattr(644,root,root,755)
247 %{_examplesdir}/%{name}-%{version}
This page took 0.079946 seconds and 3 git commands to generate.