Apply python3 build 90/229390/1 accepted/tizen/unified/20200402.155531 submit/tizen/20200402.010951
authorHyunjee Kim <hj0426.kim@samsung.com>
Tue, 31 Mar 2020 23:49:11 +0000 (08:49 +0900)
committerHyunjee Kim <hj0426.kim@samsung.com>
Tue, 31 Mar 2020 23:49:24 +0000 (08:49 +0900)
Change-Id: Ic51a02244a95399aed1a47e86f10788c3c731d3a
Signed-off-by: Hyunjee Kim <hj0426.kim@samsung.com>
packaging/python3-gobject.manifest [new file with mode: 0644]
packaging/python3-gobject.spec [new file with mode: 0644]

diff --git a/packaging/python3-gobject.manifest b/packaging/python3-gobject.manifest
new file mode 100644 (file)
index 0000000..017d22d
--- /dev/null
@@ -0,0 +1,5 @@
+<manifest>
+ <request>
+    <domain name="_"/>
+ </request>
+</manifest>
diff --git a/packaging/python3-gobject.spec b/packaging/python3-gobject.spec
new file mode 100644 (file)
index 0000000..254fbf6
--- /dev/null
@@ -0,0 +1,105 @@
+Name:           python3-gobject
+%define _name   pygobject
+Summary:        Python3 bindings for GObject
+License:        LGPL-2.1+
+Group:          Development/Libraries
+Version:        3.30.1
+Release:        0
+Url:            http://ftp.gnome.org/pub/GNOME/sources/pygobject/
+Source:         http://download.gnome.org/sources/pygobject/3.8/%{_name}-%{version}.tar.xz
+Source1001:    python3-gobject.manifest
+BuildRequires:  fdupes
+BuildRequires:  glib2-devel >= 2.31.0
+BuildRequires:  gobject-introspection-devel >=  1.34.2
+BuildRequires:  libffi-devel
+BuildRequires:  python3-cairo-devel
+BuildRequires:  python3-devel
+BuildRequires:  pkgconfig(cairo)
+BuildRequires:  pkgconfig(cairo-gobject)
+BuildRequires:  python3
+Provides:       pygobject3
+
+%description
+Pygobjects is an extension module for python3 that gives you access to
+GLib's GObjects.
+
+%package cairo
+Summary:        Python3 bindings for GObject -- Cairo bindings
+Group:          Development/Libraries
+Requires:       %{name} = %{version}
+%define cairo_real_package %(rpm -q --qf '%%{NAME}' --whatprovides cairo)
+Supplements:    packageand(%{name}:%{cairo_real_package})
+
+%description cairo
+Pygobjects is an extension module for python3 that gives you access to
+GLib's GObjects.
+
+This package contains the Python3 Cairo bindings for GObject.
+
+%package pygtkcompat
+Summary:        Python3 bindings for GObject -- PyGTK Backwards Compatibility
+Group:          Development/Libraries
+Requires:       %{name} = %{version}
+
+%description pygtkcompat
+Pygobjects is an extension module for python3 that gives you access to
+GLib's GObjects.
+
+This package contains a module providing backwards compatibility to
+pygtk.
+
+%package devel
+Summary:        Python3 bindings for GObject
+Group:          Development/Libraries
+Requires:       %{name} = %{version}
+
+%description devel
+This package contains files required to build wrappers for gobject
+addon libraries such as pygtk.
+
+%prep
+%setup -q -n %{_name}-%{version}
+cp %{SOURCE1001} .
+
+%build
+%{_bindir}/python3 setup.py build
+
+%install
+%{_bindir}/python3 setup.py install --skip-build \
+               --install-base=%{buildroot} \
+        --install-lib=%{buildroot}%{python3_sitearch} \
+        --install-purelib=%{buildroot}%{_libdir} \
+        --install-scripts=%{buildroot}%{_bindir} \
+        --install-headers=%{buildroot}%{_includedir} \
+        --install-data=%{buildroot}%{_usr}
+%py_compile %{buildroot}/%{python3_sitearch}
+%py_compile -O %{buildroot}/%{python3_sitearch}
+%fdupes %{buildroot}/%{python3_sitearch}
+
+%files
+%manifest %{name}.manifest
+%defattr(-,root,root)
+%license COPYING
+%{python3_sitelib}/gi/
+%{python3_sitelib}/PyGObject-*.egg-info
+# Lives in cairo subpackage
+%exclude %{python3_sitelib}/gi/_gi_cairo.so
+# Lives in pygtkcompat subpackage
+%exclude %{python3_sitelib}/gi/pygtkcompat.py
+
+%files cairo
+%manifest %{name}.manifest
+%defattr(-,root,root)
+%{python3_sitelib}/gi/_gi_cairo*.so
+
+%files pygtkcompat
+%manifest %{name}.manifest
+%defattr(-,root,root)
+#%{python3_sitelib}/gi/pygtkcompat.py
+%{python3_sitelib}/pygtkcompat
+
+%files devel
+%manifest %{name}.manifest
+%defattr(-,root,root)
+%{_includedir}/pygobject-3.0/
+%{_libdir}/pkgconfig/pygobject-3.0.pc