-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpython3-pygobject3.spec
More file actions
160 lines (136 loc) · 4.65 KB
/
Copy pathpython3-pygobject3.spec
File metadata and controls
160 lines (136 loc) · 4.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
#
# Conditional build:
%bcond_without doc # Sphinx documentation
%bcond_with tests # unit tests (require DISPLAY)
%define module pygobject
Summary: Python 3 bindings for GObject library
Summary(pl.UTF-8): Wiązania Pythona 3 do biblioteki GObject
Name: python3-pygobject3
Version: 3.58.0
Release: 1
License: LGPL v2+
Group: Libraries/Python
Source0: https://download.gnome.org/sources/pygobject/3.58/%{module}-%{version}.tar.gz
# Source0-md5: 96995fb877b92e8fb392cf2b66a1df6b
URL: https://pygobject.gnome.org/
BuildRequires: cairo-gobject-devel
BuildRequires: gcc >= 5:3.2
BuildRequires: glib2-devel >= 1:2.80.0
BuildRequires: gobject-introspection-devel >= 1.64.0
BuildRequires: libffi-devel >= 3.0
BuildRequires: meson >= 0.64.0
BuildRequires: ninja >= 1.5
BuildRequires: pkgconfig
BuildRequires: python3 >= 1:3.10
BuildRequires: python3-devel >= 1:3.10
BuildRequires: python3-modules >= 1:3.10
BuildRequires: python3-pycairo-devel >= 1.16.0
%if %{with tests}
BuildRequires: python3-pytest
%endif
BuildRequires: rpm-pythonprov >= 1:4.13
BuildRequires: rpm-build >= 4.6
BuildRequires: rpmbuild(macros) >= 2.042
%if %{with doc}
BuildRequires: python3-Sphinx
BuildRequires: python3-sphinx_copybutton >= 0.5.2
BuildRequires: python3-pydata_sphinx_theme
%endif
Requires: glib2 >= 1:2.80.0
Requires: gobject-introspection >= 1.64.0
Requires: python3-modules >= 1:3.10
Conflicts: python3-pygobject < 2.28.6-3
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
Python 3 bindings for GObject library.
%description -l pl.UTF-8
Wiązania Pythona 3 do biblioteki GObject.
%package devel
Summary: Python 3 bindings for GObject library - development metapackage
Summary(pl.UTF-8): Wiązania Pythona 3 do biblioteki GObject - metapakiet programistyczny
Group: Development/Languages/Python
Requires: %{name} = %{version}-%{release}
Requires: python-pygobject3-common-devel = %{version}-%{release}
Requires: glib2-devel >= 1:2.80.0
Requires: libffi-devel >= 3.0
Requires: python3-devel >= 1:3.9
Obsoletes: python3-pygobject3-examples < 3.50
%description devel
This metapackage gathers files required to develop GObject bindings
for Python 3.
%description devel -l pl.UTF-8
Ten metapakiet gromadzi pliki wymagane do tworzenia wiązań biblioteki
GObject dla Pythona 3.
%package -n python-pygobject3-common-devel
Summary: Python bindings for GObject library
Summary(pl.UTF-8): Wiązania Pythona do biblioteki GObject
Group: Development/Languages/Python
Requires: %{name} = %{version}-%{release}
Requires: glib2-devel >= 1:2.80.0
Requires: libffi-devel >= 3.0
%description -n python-pygobject3-common-devel
This package contains headers files required to build wrappers for
GObject addon libraries so that they interoperate with Python
bindings.
%description -n python-pygobject3-common-devel -l pl.UTF-8
Pakiet zawiera pliki nagłówkowe wymagane do zbudowania funkcji do
biblioteki GObject, tak by mogły te biblioteki kooperowaći z
wiązaniami Pythona.
%package apidocs
Summary: API documentation for Python GObject library
Summary(pl.UTF-8): Dokumentacja biblioteki Pythona GObject
Group: Documentation
BuildArch: noarch
%description apidocs
API documentation for Python GObject library.
%description apidocs -l pl.UTF-8
Dokumentacja biblioteki Pythona GObject.
%prep
%setup -q -n %{module}-%{version}
%build
%meson \
-Dpycairo=enabled \
%{!?with_tests:-Dtests=false}
%meson_build
%if %{with doc}
# placing _build dir inside docs causes copying it recursively; build docs by invoking sphinx manually
#%{__make} -C docs
%{__python3} -m sphinx -b html docs docs-build/html
%endif
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{py3_sitescriptdir}/gi/overrides/__pycache__
%meson_install
%py3_comp $RPM_BUILD_ROOT%{py3_sitedir}
%py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
%doc NEWS README.rst
%dir %{py3_sitedir}/gi
%{py3_sitedir}/gi/_gi.cpython-*.so
%{py3_sitedir}/gi/_gi_cairo.cpython-*.so
%{py3_sitedir}/gi/*.py
%{py3_sitedir}/gi/__pycache__
%dir %{py3_sitedir}/gi/overrides
%{py3_sitedir}/gi/overrides/*.py
%{py3_sitedir}/gi/overrides/__pycache__
%dir %{py3_sitedir}/gi/repository
%{py3_sitedir}/gi/repository/*.py*
%{py3_sitedir}/gi/repository/__pycache__
%{py3_sitedir}/PyGObject-%{version}.dist-info
%dir %{py3_sitescriptdir}/gi
%dir %{py3_sitescriptdir}/gi/overrides
%dir %{py3_sitescriptdir}/gi/overrides/__pycache__
%files devel
%defattr(644,root,root,755)
%files -n python-pygobject3-common-devel
%defattr(644,root,root,755)
%{_includedir}/pygobject-3.0
%{_pkgconfigdir}/pygobject-3.0.pc
%if %{with doc}
%files apidocs
%defattr(644,root,root,755)
%doc docs-build/html/{_images,_static,devguide,guide,news,tutorials,*.html,*.js}
%endif