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