[gramps] Update run-time dependencies for GTK+ 3.x
Bastien Nocera
hadess at fedoraproject.org
Wed Jul 16 21:05:31 UTC 2014
commit 3b00304249e1380cf2affa2076e293cb10b233b9
Author: Bastien Nocera <hadess at hadess.net>
Date: Wed Jul 16 23:05:51 2014 +0200
Update run-time dependencies for GTK+ 3.x
- Switch to Python 3
0001-Fix-ukrainian-relationship-plugin.patch | 25 ++++++++
0002-Fix-run-time-error.patch | 37 ++++++++++++
gramps-4.0.1-6807_b.patch | 42 -------------
gramps.spec | 81 ++++++++++++++------------
4 files changed, 105 insertions(+), 80 deletions(-)
---
diff --git a/0001-Fix-ukrainian-relationship-plugin.patch b/0001-Fix-ukrainian-relationship-plugin.patch
new file mode 100644
index 0000000..d05784b
--- /dev/null
+++ b/0001-Fix-ukrainian-relationship-plugin.patch
@@ -0,0 +1,25 @@
+From a7165e0094aeb1df23b04db2e693efc706ebf2c6 Mon Sep 17 00:00:00 2001
+From: Bastien Nocera <hadess at hadess.net>
+Date: Wed, 16 Jul 2014 21:43:36 +0200
+Subject: [PATCH 1/2] Fix ukrainian relationship plugin
+
+---
+ gramps/plugins/rel/rel_uk.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gramps/plugins/rel/rel_uk.py b/gramps/plugins/rel/rel_uk.py
+index b4b7a68..3ff8b30 100644
+--- a/gramps/plugins/rel/rel_uk.py
++++ b/gramps/plugins/rel/rel_uk.py
+@@ -900,7 +900,7 @@ if __name__ == "__main__":
+ import sys
+ # If someone go out
+ def goodby(signal, frame):
+- print 'No more Drink!'
++ print ('No more Drink!')
+ sys.exit(0)
+ signal.signal(signal.SIGINT, goodby)
+ # Run test
+--
+2.0.0
+
diff --git a/0002-Fix-run-time-error.patch b/0002-Fix-run-time-error.patch
new file mode 100644
index 0000000..8724b8d
--- /dev/null
+++ b/0002-Fix-run-time-error.patch
@@ -0,0 +1,37 @@
+From 09e59987dd4f298892c2bee87f1b2ec11dd5722d Mon Sep 17 00:00:00 2001
+From: Bastien Nocera <hadess at hadess.net>
+Date: Wed, 16 Jul 2014 22:57:35 +0200
+Subject: [PATCH 2/2] Fix run-time error
+
+Traceback (most recent call last):
+File "/usr/lib/python3.4/site-packages/gramps/gui/widgets/valueaction.py", line 132, in do_create_tool_item
+ self._args_for_toolitem)
+File "/usr/lib/python3.4/site-packages/gramps/gui/widgets/valuetoolitem.py", line 67, in __init__
+ self._create_widget(*args)
+File "/usr/lib/python3.4/site-packages/gramps/gui/widgets/toolcomboentry.py", line 63, in _create_widget
+ combo = ShortlistComboEntry(items, shortlist, validator)
+File "/usr/lib/python3.4/site-packages/gramps/gui/widgets/shortlistcomboentry.py", line 104, in __init__
+ COLUMN_ITEM, validator, width=width)
+File "/usr/lib/python3.4/site-packages/gramps/gui/widgets/validatedcomboentry.py", line 76, in __init__
+ dummy_event = Gdk.Event(Gdk.EventType.NOTHING)
+TypeError: function takes at most 0 arguments (1 given)
+---
+ gramps/gui/widgets/validatedcomboentry.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gramps/gui/widgets/validatedcomboentry.py b/gramps/gui/widgets/validatedcomboentry.py
+index a509868..f97dd17 100644
+--- a/gramps/gui/widgets/validatedcomboentry.py
++++ b/gramps/gui/widgets/validatedcomboentry.py
+@@ -73,7 +73,7 @@ class ValidatedComboEntry(Gtk.ComboBox):
+ self._entry.set_width_chars(width)
+ # <hack description="set the GTK_ENTRY(self._entry)->is_cell_renderer
+ # flag to TRUE in order to tell the entry to fill its allocation.">
+- dummy_event = Gdk.Event(Gdk.EventType.NOTHING)
++ dummy_event = Gdk.Event()
+ self._entry.start_editing(dummy_event)
+ # </hack>
+ self.add(self._entry)
+--
+2.0.0
+
diff --git a/gramps.spec b/gramps.spec
index d268f77..22c7ded 100644
--- a/gramps.spec
+++ b/gramps.spec
@@ -1,8 +1,7 @@
-%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
#global _beta 2
Name: gramps
Version: 4.1.0
-Release: 1%{?_beta:.beta%{_beta}}%{?dist}
+Release: 2%{?_beta:.beta%{_beta}}%{?dist}
Summary: Genealogical Research and Analysis Management Programming System
Group: Applications/Productivity
@@ -10,49 +9,49 @@ License: GPLv2+
URL: http://gramps-project.org/
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}%{?_beta:-0beta%{_beta}}.tar.gz
Source1: resource-path
-#Patch0: gramps-4.0.1-6807_b.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
+Patch0: 0001-Fix-ukrainian-relationship-plugin.patch
+Patch1: 0002-Fix-run-time-error.patch
+
BuildRequires: desktop-file-utils
BuildRequires: gettext
BuildRequires: perl(XML::Parser)
-BuildRequires: gnome-python2-gnome
-BuildRequires: gnome-python2-canvas
-BuildRequires: gnome-python2-gconf
-BuildRequires: gnome-vfs2-devel
+BuildRequires: python3
+BuildRequires: python3-gobject
BuildRequires: intltool
-BuildRequires: pygtk2-libglade
-BuildRequires: python-devel
BuildRequires: gnome-doc-utils
-BuildRequires: python-setuptools
+BuildRequires: python3-setuptools
Requires: %{name}-common = %{version}-%{release}
-Requires: gnome-python2-canvas
-Requires: gnome-python2-gconf
-Requires: gnome-python2-gnomevfs
-Requires: gnome-python2-gnome
-Requires: gnome-python2-gnomeprint
-Requires: gnome-python2-gtkspell
+Requires: python3
+Requires: python3-gobject
+Requires: gtk3
+Requires: pango
+Requires: librsvg2
+Requires: xdg-utils
Requires: rcs
Requires: graphviz
Requires: osm-gps-map-gobject
-Requires: pygobject3
-Requires: pyicu
+Requires: python3-pyicu
Requires: gtkspell3
-Requires: libgexiv2-python2
+Requires: libgexiv2
+Requires: python3-bsddb3
Requires: gnu-free-serif-fonts
Requires: gnu-free-mono-fonts
Requires: gnu-free-fonts-common
Requires: gnu-free-sans-fonts
-Requires(pre): GConf2
+Requires(pre): shared-mime-info
Requires(post): desktop-file-utils
-Requires(post): GConf2
-Requires(preun): GConf2
+Requires(post): shared-mime-info
+Requires(post): gtk2
+Requires(preun): shared-mime-info
Requires(postun): desktop-file-utils
+Requires(postun): gtk2
%description
gramps (Genealogical Research and Analysis Management Programming
@@ -81,16 +80,17 @@ Web interface for the Gramps Genealogy application.
%prep
%setup -q
-#%patch0 -p0 -b .6807b
+%patch0 -p1
+%patch1 -p1
%build
-%{__python} setup.py build
-%{__python} setup.py --server build
+%{__python3} setup.py build
+%{__python3} setup.py --server build
%install
rm -rf ${RPM_BUILD_ROOT}
-%{__python} setup.py install --skip-build --root ${RPM_BUILD_ROOT}
-%{__python} setup.py install --server --skip-build --root ${RPM_BUILD_ROOT}
+%{__python3} setup.py install --skip-build --root ${RPM_BUILD_ROOT}
+%{__python3} setup.py install --server --skip-build --root ${RPM_BUILD_ROOT}
mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/locale
cp -pr build/mo/* ${RPM_BUILD_ROOT}%{_datadir}/locale/
@@ -111,7 +111,7 @@ rm -rf ${RPM_BUILD_ROOT}%{_datadir}/icons/
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps/
cp -p $RPM_BUILD_ROOT%{_datadir}/%{name}/images/%{name}.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps/
-install -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{python_sitelib}/gramps/gen/utils/resource-path
+install -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{python3_sitelib}/gramps/gen/utils/resource-path
%find_lang %{name}
@@ -152,23 +152,28 @@ fi
#%{_datadir}/icons/gnome/scalable/mimetypes/*.svg
%{_datadir}/pixmaps/%{name}.png
%{_mandir}/man1/%{name}.1.gz
-%{python_sitelib}/gramps*egg-info
-%{python_sitelib}/gramps/__init*
-%{python_sitelib}/gramps/grampsapp*
-%{python_sitelib}/gramps/gui
-%{python_sitelib}/gramps/test
-%{python_sitelib}/gramps/version*
+%{python3_sitelib}/gramps*egg-info
+%{python3_sitelib}/gramps/__init*
+%{python3_sitelib}/gramps/grampsapp*
+%{python3_sitelib}/gramps/gui
+%{python3_sitelib}/gramps/test
+%{python3_sitelib}/gramps/version*
+%{python3_sitelib}/gramps/__pycache__
%files common
-%{python_sitelib}/gramps/cli
-%{python_sitelib}/gramps/gen
-%{python_sitelib}/gramps/plugins
+%{python3_sitelib}/gramps/cli
+%{python3_sitelib}/gramps/gen
+%{python3_sitelib}/gramps/plugins
%files webapp
%defattr(-,root,root,-)
-%{python_sitelib}/gramps/webapp
+%{python3_sitelib}/gramps/webapp
%changelog
+* Wed Jul 16 2014 Bastien Nocera <bnocera at redhat.com> 4.1.0-2}
+- Update run-time dependencies for GTK+ 3.x
+- Switch to Python 3
+
* Mon Jun 23 2014 Jiri Kastner <jkastner at redhat dot com> - 4.1.0-1
- update to 4.1.0
More information about the scm-commits
mailing list