Bump to python-gobject-3.36.1
[platform/upstream/python-gobject.git] / packaging / python-gobject.spec
1 %define local_py_requires %{py_requires}
2 %define local_py_sitedir  %{py_sitedir}
3 %define local_py_suffix   2
4 %define local_lib_ver     0
5
6 Name:           python-gobject
7 %define _name   pygobject
8 Summary:        Python bindings for GObject
9 License:        LGPL-2.1+
10 Group:          Development/Libraries
11 Version:        3.36.1
12 Release:        0
13 Url:            http://ftp.gnome.org/pub/GNOME/sources/pygobject/
14 Source:         http://download.gnome.org/sources/pygobject/3.8/%{_name}-%{version}.tar.xz
15 Source1001:     python-gobject.manifest
16 BuildRequires:  fdupes
17 BuildRequires:  glib2-devel >= 2.48.0
18 BuildRequires:  gobject-introspection-devel >=  1.46.0
19 BuildRequires:  libffi-devel
20 BuildRequires:  python-cairo-devel
21 BuildRequires:  python-devel
22 BuildRequires:  pkgconfig(cairo)
23 BuildRequires:  pkgconfig(cairo-gobject)
24 BuildRequires:  python
25 Provides:       pygobject3
26
27 %description
28 Pygobjects is an extension module for python that gives you access to
29 GLib's GObjects.
30
31 %package cairo
32 Summary:        Python bindings for GObject -- Cairo bindings
33 Group:          Development/Libraries
34 Requires:       %{name} = %{version}
35
36 %description cairo
37 Pygobjects is an extension module for python that gives you access to
38 GLib's GObjects.
39
40 This package contains the Python Cairo bindings for GObject.
41
42 %package pygtkcompat
43 Summary:        Python bindings for GObject -- PyGTK Backwards Compatibility
44 Group:          Development/Libraries
45 Requires:       %{name} = %{version}
46
47 %description pygtkcompat
48 Pygobjects is an extension module for python that gives you access to
49 GLib's GObjects.
50
51 This package contains a module providing backwards compatibility to
52 pygtk.
53
54 %package devel
55 Summary:        Python bindings for GObject
56 Group:          Development/Libraries
57 Requires:       %{name} = %{version}
58
59 %description devel
60 This package contains files required to build wrappers for gobject
61 addon libraries such as pygtk.
62
63 %prep
64 %setup -q -n %{_name}-%{version}
65 cp %{SOURCE1001} .
66
67 %build
68 %{__python} setup.py build
69
70 %install
71 %{__python} setup.py install --skip-build \
72                 --install-base=%{buildroot} \
73         --install-lib=%{buildroot}%{python_sitearch} \
74         --install-purelib=%{buildroot}%{_libdir} \
75         --install-scripts=%{buildroot}%{_bindir} \
76         --install-headers=%{buildroot}%{_includedir} \
77         --install-data=%{buildroot}%{_usr}
78 %py_compile %{buildroot}/%{python_sitearch}
79 %py_compile -O %{buildroot}/%{python_sitearch}
80 %fdupes %{buildroot}/%{python_sitearch}
81
82 %files
83 %manifest %{name}.manifest
84 %defattr(-,root,root)
85 %license COPYING
86 %{local_py_sitedir}/gi/
87 %{local_py_sitedir}/PyGObject-*.egg-info
88 # Lives in cairo subpackage
89 %exclude %{local_py_sitedir}/gi/_gi_cairo.so
90 # Lives in pygtkcompat subpackage
91 %exclude %{local_py_sitedir}/gi/pygtkcompat.py
92
93 %files cairo
94 %manifest %{name}.manifest
95 %defattr(-,root,root)
96 %{local_py_sitedir}/gi/_gi_cairo.so
97
98 %files pygtkcompat
99 %manifest %{name}.manifest
100 %defattr(-,root,root)
101 #%{local_py_sitedir}/gi/pygtkcompat.py
102 %{local_py_sitedir}/pygtkcompat
103
104 %files devel
105 %manifest %{name}.manifest
106 %defattr(-,root,root)
107 %{_includedir}/pygobject-3.0/
108 %{_libdir}/pkgconfig/pygobject-3.0.pc