]>
Commit | Line | Data |
---|---|---|
a5fba226 AF |
1 | # |
2 | # Conditional build: | |
1c1e8382 | 3 | %bcond_without doc # Sphinx documentation |
d973536f | 4 | %bcond_with tests # unit tests (require DISPLAY) |
63e1dd2b | 5 | |
a5fba226 | 6 | %define module pygobject |
8b2292b9 JB |
7 | Summary: Python 3 bindings for GObject library |
8 | Summary(pl.UTF-8): Wiązania Pythona 3 do biblioteki GObject | |
9 | Name: python3-pygobject3 | |
d648dffe | 10 | Version: 3.42.0 |
a49043d0 | 11 | Release: 6 |
a5fba226 AF |
12 | License: LGPL v2+ |
13 | Group: Libraries/Python | |
d648dffe JB |
14 | Source0: https://download.gnome.org/sources/pygobject/3.42/%{module}-%{version}.tar.xz |
15 | # Source0-md5: 1cf619f7016a615d8f88ca4ac66ebbb3 | |
14d87b6a | 16 | URL: https://wiki.gnome.org/Projects/PyGObject |
590b40c5 | 17 | BuildRequires: cairo-gobject-devel |
60886a68 JP |
18 | BuildRequires: glib2-devel >= 1:2.56.0 |
19 | BuildRequires: gobject-introspection-devel >= 1.56.0 | |
a5fba226 | 20 | BuildRequires: libffi-devel >= 3.0 |
a5fba226 | 21 | BuildRequires: pkgconfig |
60886a68 JP |
22 | BuildRequires: python3 >= 1:3.6 |
23 | BuildRequires: python3-devel >= 1:3.6 | |
24 | BuildRequires: python3-modules >= 1:3.6 | |
25 | BuildRequires: python3-pycairo-devel >= 1.16.0 | |
1c1e8382 JB |
26 | BuildRequires: python3-setuptools |
27 | %if %{with tests} | |
28 | BuildRequires: python3-pytest | |
29 | %endif | |
8b2292b9 | 30 | BuildRequires: rpm-pythonprov |
312086e2 | 31 | BuildRequires: rpm-build >= 4.6 |
8b2292b9 | 32 | BuildRequires: rpmbuild(macros) >= 1.714 |
3234d261 JR |
33 | %if %{with doc} |
34 | BuildRequires: sphinx-pdg | |
35 | BuildRequires: python3-sphinx_rtd_theme | |
36 | %endif | |
8b2292b9 JB |
37 | BuildRequires: tar >= 1:1.22 |
38 | BuildRequires: xz | |
60886a68 JP |
39 | Requires: glib2 >= 1:2.56.0 |
40 | Requires: gobject-introspection >= 1.56.0 | |
41 | Requires: python3-modules >= 1:3.6 | |
8b2292b9 | 42 | Conflicts: python3-pygobject < 2.28.6-3 |
a5fba226 AF |
43 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
44 | ||
a5fba226 | 45 | %description |
8b2292b9 | 46 | Python 3 bindings for GObject library. |
a5fba226 AF |
47 | |
48 | %description -l pl.UTF-8 | |
8b2292b9 | 49 | Wiązania Pythona 3 do biblioteki GObject. |
3955a8b7 | 50 | |
a5fba226 | 51 | %package devel |
8b2292b9 JB |
52 | Summary: Python 3 bindings for GObject library - development metapackage |
53 | Summary(pl.UTF-8): Wiązania Pythona 3 do biblioteki GObject - metapakiet programistyczny | |
a5fba226 AF |
54 | Group: Development/Languages/Python |
55 | Requires: %{name} = %{version}-%{release} | |
8b2292b9 | 56 | Requires: python-pygobject3-common-devel = %{version}-%{release} |
41b0cda2 | 57 | Requires: glib2-devel >= 1:2.48.0 |
a5fba226 | 58 | Requires: libffi-devel >= 3.0 |
8b2292b9 | 59 | Requires: python3-devel >= 1:3.5 |
a5fba226 AF |
60 | |
61 | %description devel | |
e4d02b95 | 62 | This metapackage gathers files required to develop GObject bindings |
8b2292b9 | 63 | for Python 3. |
a5fba226 AF |
64 | |
65 | %description devel -l pl.UTF-8 | |
e4d02b95 | 66 | Ten metapakiet gromadzi pliki wymagane do tworzenia wiązań biblioteki |
8b2292b9 | 67 | GObject dla Pythona 3. |
a5fba226 | 68 | |
8b2292b9 JB |
69 | %package -n python-pygobject3-common-devel |
70 | Summary: Python bindings for GObject library | |
71 | Summary(pl.UTF-8): Wiązania Pythona do biblioteki GObject | |
a5fba226 | 72 | Group: Development/Languages/Python |
8b2292b9 | 73 | Requires: %{name} = %{version}-%{release} |
41b0cda2 | 74 | Requires: glib2-devel >= 1:2.48.0 |
a5fba226 | 75 | Requires: libffi-devel >= 3.0 |
a5fba226 | 76 | |
8b2292b9 JB |
77 | %description -n python-pygobject3-common-devel |
78 | This package contains headers files required to build wrappers for | |
79 | GObject addon libraries so that they interoperate with Python | |
80 | bindings. | |
a5fba226 | 81 | |
8b2292b9 JB |
82 | %description -n python-pygobject3-common-devel -l pl.UTF-8 |
83 | Pakiet zawiera pliki nagłówkowe wymagane do zbudowania funkcji do | |
84 | biblioteki GObject, tak by mogły te biblioteki kooperowaći z | |
85 | wiązaniami Pythona. | |
a5fba226 | 86 | |
1c1e8382 JB |
87 | %package apidocs |
88 | Summary: API documentation for Python GObject library | |
89 | Summary(pl.UTF-8): Dokumentacja biblioteki Pythona GObject | |
90 | Group: Documentation | |
1c1e8382 | 91 | BuildArch: noarch |
1c1e8382 JB |
92 | |
93 | %description apidocs | |
94 | API documentation for Python GObject library. | |
95 | ||
96 | %description apidocs -l pl.UTF-8 | |
97 | Dokumentacja biblioteki Pythona GObject. | |
98 | ||
a5fba226 AF |
99 | %package examples |
100 | Summary: Example programs for GObject library | |
101 | Summary(pl.UTF-8): Programy przykładowe dla biblioteki GObject | |
102 | Group: Development/Languages/Python | |
103 | Requires: %{name}-devel = %{version}-%{release} | |
1c1e8382 | 104 | BuildArch: noarch |
a5fba226 AF |
105 | |
106 | %description examples | |
107 | This package contains example programs for GObject library. | |
108 | ||
109 | %description examples -l pl.UTF-8 | |
110 | Ten pakiet zawiera przykładowe programy dla biblioteki GObject. | |
111 | ||
a5fba226 AF |
112 | %prep |
113 | %setup -q -n %{module}-%{version} | |
114 | ||
ce55a23d JP |
115 | %{__sed} -i -e '1s|#!/usr/bin/env python$|#!%{__python}|' examples/cairo-demo.py |
116 | ||
a5fba226 | 117 | %build |
1c1e8382 | 118 | %py3_build %{?with_tests:test} |
1c1e8382 JB |
119 | |
120 | %if %{with doc} | |
121 | %{__make} -C docs | |
a5fba226 AF |
122 | %endif |
123 | ||
124 | %install | |
125 | rm -rf $RPM_BUILD_ROOT | |
3234d261 | 126 | install -d $RPM_BUILD_ROOT{%{_examplesdir}/%{name}-%{version},%{py3_sitescriptdir}/gi/overrides/__pycache__} |
a5fba226 | 127 | |
1c1e8382 | 128 | %py3_install |
a5fba226 | 129 | |
1c1e8382 JB |
130 | cp -a examples/*.py $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
131 | ||
a5fba226 AF |
132 | %clean |
133 | rm -rf $RPM_BUILD_ROOT | |
134 | ||
a5fba226 AF |
135 | %files |
136 | %defattr(644,root,root,755) | |
1c1e8382 | 137 | %doc NEWS README.rst |
a5fba226 | 138 | %dir %{py3_sitedir}/gi |
205b0127 JB |
139 | %attr(755,root,root) %{py3_sitedir}/gi/_gi.cpython*.so |
140 | %attr(755,root,root) %{py3_sitedir}/gi/_gi_cairo.cpython*.so | |
7d22b890 | 141 | %{py3_sitedir}/gi/*.py |
decdeaaa | 142 | %{py3_sitedir}/gi/__pycache__ |
a5fba226 | 143 | %dir %{py3_sitedir}/gi/overrides |
7d22b890 | 144 | %{py3_sitedir}/gi/overrides/*.py |
decdeaaa | 145 | %{py3_sitedir}/gi/overrides/__pycache__ |
a5fba226 AF |
146 | %dir %{py3_sitedir}/gi/repository |
147 | %{py3_sitedir}/gi/repository/*.py* | |
decdeaaa | 148 | %{py3_sitedir}/gi/repository/__pycache__ |
decdeaaa | 149 | %dir %{py3_sitedir}/pygtkcompat |
7d22b890 | 150 | %{py3_sitedir}/pygtkcompat/*.py |
decdeaaa | 151 | %{py3_sitedir}/pygtkcompat/__pycache__ |
1c1e8382 | 152 | %{py3_sitedir}/PyGObject-%{version}-py*.egg-info |
a49043d0 JR |
153 | %dir %{py3_sitescriptdir}/gi |
154 | %dir %{py3_sitescriptdir}/gi/overrides | |
3234d261 | 155 | %dir %{py3_sitescriptdir}/gi/overrides/__pycache__ |
a5fba226 | 156 | |
8b2292b9 JB |
157 | %files devel |
158 | %defattr(644,root,root,755) | |
159 | ||
160 | %files -n python-pygobject3-common-devel | |
a5fba226 | 161 | %defattr(644,root,root,755) |
8b2292b9 JB |
162 | %{_includedir}/pygobject-3.0 |
163 | %{_pkgconfigdir}/pygobject-3.0.pc | |
a5fba226 | 164 | |
1c1e8382 JB |
165 | %if %{with doc} |
166 | %files apidocs | |
167 | %defattr(644,root,root,755) | |
168 | %doc docs/_build/{_images,_static,devguide,guide,*.html,*.js} | |
169 | %endif | |
170 | ||
a5fba226 AF |
171 | %files examples |
172 | %defattr(644,root,root,755) | |
173 | %{_examplesdir}/%{name}-%{version} |