The removal of python-gnome2 (and anything that relies on it) is necessary apparently because some "selectors" have not yet been converted. The right thing to do here is to fix the selectors rather than removing the package.

+

+

You can also run Gramps 4.0+ in [[GEPS_031:_Python_3_support#Ubuntu_12.10|Python 3]] first Install the Python BSDDB interface and check that it [[Install_latest_BSDDB#Python_BSDDB_interface|works]]

+

sudo apt-get install python3-bsddb3

+

+

+

You will probably want these optional packages:

+

+

sudo apt-get install python-pygoocanvas gir1.2-goocanvas-2.0-9

+

+

For additional functionality, install these:

+

+

sudo apt-get install python-pyexiv2

+

=== Ubuntu 12.04 ===

=== Ubuntu 12.04 ===

For people on Ubuntu 12.04, you need:

For people on Ubuntu 12.04, you need:

Line 86:

Line 110:

=== Debian Testing ===

=== Debian Testing ===

−

As of 25 July 2012, the Debian repositories does not contain sufficiently up-to-date python GObject introspection packages and so need to be installed from the experimental repository, which currently contains version 3.3.4. Perhaps the simplest way to install is just to download the latest packages from the Debian packages web site. The files required can be found for different architectures at:

+

As of 25 July 2012, the Debian repositories does not contain sufficiently up-to-date python GObject introspection packages and so need to be installed from the experimental repository, which currently contains version 3.4.2-2. Perhaps the simplest way to install is just to download the latest packages from the Debian packages web site. The files required can be found for different architectures at:

* [http://packages.debian.org/experimental/python-gi python-gi]

* [http://packages.debian.org/experimental/python-gi python-gi]

Line 93:

Line 117:

Install the package files with dpkg. eg

Install the package files with dpkg. eg

−

dpkg -i python-gi_3.3.4-1_i386.deb

+

dpkg -i python-gi_3.4.2-2_i386.deb

−

+

−

A GTK3 theme engine is required to make Gramps look visually more appealing. Try gtk3-engines-oxygen.

+

=== GTK 3 theme ===

=== GTK 3 theme ===

+

A GTK3 theme engine is required to make Gramps look visually more appealing.

For working spell check, we need a patched gtkspell version that supports gobject introspection. A working version is the '''changes''' branch at [https://github.com/manisandro/gtkspell3/tree/changes https://github.com/manisandro/gtkspell3/tree/changes]. So one needs to install this version of gtkspell. The python-gtkspell code is then no longer needed, and can be removed. Source of this code is a sourceforge bug entry [https://sourceforge.net/tracker/index.php?func=detail&aid=3298132&group_id=7896&atid=107896] and a redhat bug entry: [https://bugzilla.redhat.com/show_bug.cgi?id=675504]

+

For working spell check, you need [http://gtkspell.sourceforge.net/ gtkspell 3.3.0].

−

Gramps supports this version since revision 20130: [http://gramps.svn.sourceforge.net/viewvc/gramps/trunk/src/gui/spell.py?r1=20057&r2=20130]

+

In Ubuntu 12.10, this is available in your distribution as libgtkspell-3-0 package.

+

+

If the package is not in your distributions packages, you need to compile the spell check. For this, obtain the GtkSpell 3.3.0 or later source code, and extract the code to a directory, eg gtkspell3, and go into this directory using the terminal.

+

+

Before continuing, remove any old version of gtkspell v3 you might have installed before!

−

==== Installation of spell check in Ubuntu 12.04 ====

−

First we install the git package to obtain the code:

−

sudo apt-get install git

−

Obtain the source code, and change to the version with gtk3 and gobject introspection support:

−

git clone git://github.com/manisandro/gtkspell3.git

−

cd gtkspell3/

−

git checkout -b changes origin/changes

Now obtain the packages needed to compile this code. In my case I had most code (see above installation introspection for other packages that might be needed). I still needed to install the following:

Now obtain the packages needed to compile this code. In my case I had most code (see above installation introspection for other packages that might be needed). I still needed to install the following:

sudo apt-get install gtk-doc-tools libenchant-dev

sudo apt-get install gtk-doc-tools libenchant-dev

+

You may also need gtk3 devel packages:

+

sudo apt-get install gtk+-3.0-dev

Now compile and install the code

Now compile and install the code

−

./autogen.sh

+

./configure

make

make

sudo make install

sudo make install

Gramps now needs to find the gtkspell typelib and introspection lib. The first I achieve by copying the typelib to the correct location:

Gramps now needs to find the gtkspell typelib and introspection lib. The first I achieve by copying the typelib to the correct location:

we need a patched gtkspell version that supports gobject introspection. A working version is the '''changes''' branch at [https://github.com/manisandro/gtkspell3/tree/changes https://github.com/manisandro/gtkspell3/tree/changes]. So one needs to install this version of gtkspell. The python-gtkspell code is then no longer needed, and can be removed. Source of this code is a sourceforge bug entry [https://sourceforge.net/tracker/index.php?func=detail&aid=3298132&group_id=7896&atid=107896] and a redhat bug entry: [https://bugzilla.redhat.com/show_bug.cgi?id=675504]

+

+

Gramps supports this version since revision 20130: [http://gramps.svn.sourceforge.net/viewvc/gramps/trunk/src/gui/spell.py?r1=20057&r2=20130]

+

+

First we install the git package to obtain the code:

+

sudo apt-get install git

+

Obtain the source code, and change to the version with gtk3 and gobject introspection support:

+

git clone git://github.com/manisandro/gtkspell3.git

+

cd gtkspell3/

+

git checkout -b changes origin/changes

=== WebKit for Htmlrenderer ===

=== WebKit for Htmlrenderer ===

Line 143:

Line 224:

Developerwize, we need to replace size-request signal, see [http://developer.gnome.org/gtk3/3.0/ch25s02.html]

Developerwize, we need to replace size-request signal, see [http://developer.gnome.org/gtk3/3.0/ch25s02.html]

−

== Problems ==

+

=== OsmGpsMap for Geography ===

+

The Geography requires osmgpsmap. Introspection bindings for this is not currently available, so you need to compile it.

+

As it doesn't work correctly for the moment and some patches are not in git, I forked osmgpsmap.

−

If anyone files a bug against PyGobject, Gtk or any of the Gtk dependencies (except Cairo, which isn't part of Gnome), please add John (the address bugzilla has is jralls@ceridwen.fremont.ca.us) to the CC list at the bottom of the bug report page or post the bug URI to the gramps-devel list.

+

git clone git://github.com/SNoiraud/osm-gps-map.git

+

cd osm-gps-map

+

# switch to branch gtk3

+

git checkout -b gtk3 origin/gtk3

+

git branch -a

−

* there are some drag and drop issues: [https://bugzilla.gnome.org/show_bug.cgi?id=680638], [https://bugzilla.gnome.org/show_bug.cgi?id=680640]. '''Solved:''' Use set_target_list functions for drag and drop with a created TargetList.

+

As I'm currently modifying osm-gps-map, If you already have osm-gps-map and you want to get the last version, do :

−

* we cannot set strings in struct, see GTK bug [https://bugzilla.gnome.org/show_bug.cgi?id=678401]

+

−

* error in list_families on textview in styledtexteditor: [https://bugzilla.gnome.org/show_bug.cgi?id=679654]

+

−

* str and unicode no longer seem to work, the encoding must be passed too; '''Future: deprecate unicode() in the code, as we want to support python 3''' - '''SOLVED FOR NOW'': added reload(sys) in gramps.py and set encoding to utf-8. Is there a better way that is userfriendly?

+

−

* there is no longer automatic conversion to str utf-8 when using GTK functions, we must convert before passing to GTK.

+

−

* glade can no longer work with our catalog. We need to upgrade comboboxentry to combobox with has_entry manually, and hope editors keep working... - '''SOLVED:''' converted editevent.glade, all works

+

−

* expose is no longer present on gtk.widget. Draw must be used. Unclear how, [https://mail.gnome.org/archives/commits-list/2010-December/msg01138.html].

+

−

* Gtk.Clipboard seems to work differently

+

−

* Pedigreeview is broken and must be converted to new drawing primitives. Same probably for fanchart.

+

−

* osmgpsmap is GTK2. There is a GTK3 branch in git, we should try it, and contribute to the conversion.

+

−

* menu.popup does not seem to work in some instances. '''Solved:''' Make sure the reference to menu survives, so eg, do self.menu= function, then self.menu.popup. Alternatively, passing position function seems to also work as workaround, see grampsbar.py for example

+

−

* Many Gtk elements no longer grab certain events. '''Solved:''' Add a Gtk.EventBox under them to grab the event.

+

−

=== OsmGpsMap for Geography ===

+

git pull

−

The Geography requires osmgpsmap. Introspection bindings for this is not currently available, so you need to compile it.

+

−

As it doesn't work correctly for the moment and some patches are not in git, I made one tar file.

+

−

I put it on the bug #{{bug|5009}}

+

−

tar jxvf osmgpsmap.tar.bz2

+

You might have all your dependencies as you already compiled pygobject. For Ubuntu you still need packages libsoup2.4-dev and libsoup2.4

−

cd osmgpsmap

+

−

You normaly have all your dependencies as you already compile pygobject

First sets library to ''/usr/local/lib'' so as to find osmgpsmap and gtkspell, second ''/usr/local/lib/python2.7/site-packages/'' to find the local install of pygobject

== Problems ==

== Problems ==

−

For the moment it doesn't work:

−

No menu

+

If anyone files a bug against PyGobject, Gtk or any of the Gtk dependencies (except Cairo, which isn't part of Gnome), please add John (the address bugzilla has is jralls@ceridwen.fremont.ca.us) to the CC list at the bottom of the bug report page or post the bug URI to the gramps-devel list.

−

No zoom

+

=== Open ===

+

* We cannot set strings in struct, see GTK bug [https://bugzilla.gnome.org/show_bug.cgi?id=678401] It seems we can do without this, so not an issue at the moment

+

* osmgpsmap is GTK2. There is a GTK3 branch in git, we should try it, and contribute to the conversion. '''In Progress''': Geography really minimalist : no menu, no markers, ...

metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases</pre>

+

* Geography : missing tiles : osm-gps-map problem.

+

* Geography : for all other problems, use last version with git pull. Be careful, osm-gps-map is now 0.8. You must remove all 1.0 versions (OsmGpsMap*.gir and OsmGpsMap*.typelib)

+

* No rows_reordered function on treemodels in python, see GTK bug [https://bugzilla.gnome.org/show_bug.cgi?id=684558]. Current fix: disconnect and reconnect the model so sort need not emit rows-reordered signal. However, this means the history of expand collapse of nodes in a treeview is lost after rows have been reordered (this happens in gramps on click on the column that is already sorted.

+

* Geography : We cannot mix osmgpsmap between trunk and gramps34 and others.

+

===Solved or workaround===

+

* there are some drag and drop issues: [https://bugzilla.gnome.org/show_bug.cgi?id=680638], [https://bugzilla.gnome.org/show_bug.cgi?id=680640]. '''Solved:''' Use set_target_list functions for drag and drop with a created TargetList.

+

* error in list_families on textview in styledtexteditor: [https://bugzilla.gnome.org/show_bug.cgi?id=679654]. '''Workaround''': we use a global function that calls this once as workaround. There is a fix upstream.

+

* str and unicode no longer seem to work, the encoding must be passed too; '''Future: deprecate unicode() in the code, as we want to support python 3''' - '''SOLVED FOR NOW'': added reload(sys) in gramps.py and set encoding to utf-8. Is there a better way that is userfriendly?

+

* there is no longer automatic conversion to str utf-8 when using GTK functions, we must convert before passing to GTK.

+

* glade can no longer work with our catalog. We need to upgrade comboboxentry to combobox with has_entry manually, and hope editors keep working... - '''Solved:''' Although our catalog cannot be opened, we can use glade with undefined elements without issues.

+

* menu.popup does not seem to work in some instances. '''Solved:''' Make sure the reference to menu survives, so eg, do self.menu= function, then self.menu.popup. Alternatively, passing position function seems to also work as workaround, see grampsbar.py for example

+

* Many Gtk elements no longer grab certain events. '''Solved:''' Add a Gtk.EventBox under them to grab the event.

The removal of python-gnome2 (and anything that relies on it) is necessary apparently because some "selectors" have not yet been converted. The right thing to do here is to fix the selectors rather than removing the package.

You can also run Gramps 4.0+ in Python 3 first Install the Python BSDDB interface and check that it works

sudo apt-get install python3-bsddb3

You will probably want these optional packages:

sudo apt-get install python-pygoocanvas gir1.2-goocanvas-2.0-9

For additional functionality, install these:

sudo apt-get install python-pyexiv2

Ubuntu 12.04

For people on Ubuntu 12.04, you need:

1. add the gnome_shell repo to have the latest version of glib and friends, see how to add the ppa on:
gnome_shell pppa
Then upgrade your system via the system manager.

Note 1 : If you use Gnome3, also add the gnome3 ppa!

Note 2: this can make gnome shell unstable if the ppa is too bleeding edge!!

2. install version 3.3.2 of pygobject. No ppa for this, I use the git repo on gnome.org, so my git config:

Debian Testing

As of 25 July 2012, the Debian repositories does not contain sufficiently up-to-date python GObject introspection packages and so need to be installed from the experimental repository, which currently contains version 3.4.2-2. Perhaps the simplest way to install is just to download the latest packages from the Debian packages web site. The files required can be found for different architectures at:

KDE

To set the theme, open gramps, and open System settings -> Application Appearance -> GTK+ Appearance, and select different theme, click on apply. If you see Gramps update completely, you have selected a theme with GTK 3 support. If the theme falls back to something consisting of Raleigh theme components, the theme does not have good GTK 3 support. Even if Gramps updates, not all elements visible will update. Restart Gramps to be sure the theme works as intended. You can install gtk-theme-switch to test themes.

Spell Check Install

In Ubuntu 12.10, this is available in your distribution as libgtkspell-3-0 package.

If the package is not in your distributions packages, you need to compile the spell check. For this, obtain the GtkSpell 3.3.0 or later source code, and extract the code to a directory, eg gtkspell3, and go into this directory using the terminal.

Before continuing, remove any old version of gtkspell v3 you might have installed before!

Now obtain the packages needed to compile this code. In my case I had most code (see above installation introspection for other packages that might be needed). I still needed to install the following:

sudo apt-get install gtk-doc-tools libenchant-dev

You may also need gtk3 devel packages:

sudo apt-get install gtk+-3.0-dev

Now compile and install the code

./configure
make
sudo make install

Gramps now needs to find the gtkspell typelib and introspection lib. The first I achieve by copying the typelib to the correct location:

Old install method

we need a patched gtkspell version that supports gobject introspection. A working version is the changes branch at https://github.com/manisandro/gtkspell3/tree/changes. So one needs to install this version of gtkspell. The python-gtkspell code is then no longer needed, and can be removed. Source of this code is a sourceforge bug entry [7] and a redhat bug entry: [8]

WebKit for Htmlrenderer

OsmGpsMap for Geography

The Geography requires osmgpsmap. Introspection bindings for this is not currently available, so you need to compile it.
As it doesn't work correctly for the moment and some patches are not in git, I forked osmgpsmap.

First sets library to /usr/local/lib so as to find osmgpsmap and gtkspell, second /usr/local/lib/python2.7/site-packages/ to find the local install of pygobject

Problems

If anyone files a bug against PyGobject, Gtk or any of the Gtk dependencies (except Cairo, which isn't part of Gnome), please add John (the address bugzilla has is jralls@ceridwen.fremont.ca.us) to the CC list at the bottom of the bug report page or post the bug URI to the gramps-devel list.

Open

We cannot set strings in struct, see GTK bug [11] It seems we can do without this, so not an issue at the moment

osmgpsmap is GTK2. There is a GTK3 branch in git, we should try it, and contribute to the conversion. In Progress: Geography really minimalist : no menu, no markers, ...

TypeError: Error when calling the metaclass bases
metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases

Geography : missing tiles : osm-gps-map problem.

Geography : for all other problems, use last version with git pull. Be careful, osm-gps-map is now 0.8. You must remove all 1.0 versions (OsmGpsMap*.gir and OsmGpsMap*.typelib)

No rows_reordered function on treemodels in python, see GTK bug [12]. Current fix: disconnect and reconnect the model so sort need not emit rows-reordered signal. However, this means the history of expand collapse of nodes in a treeview is lost after rows have been reordered (this happens in gramps on click on the column that is already sorted.

Geography : We cannot mix osmgpsmap between trunk and gramps34 and others.

Solved or workaround

there are some drag and drop issues: [13], [14]. Solved: Use set_target_list functions for drag and drop with a created TargetList.

error in list_families on textview in styledtexteditor: [15]. Workaround: we use a global function that calls this once as workaround. There is a fix upstream.

str and unicode no longer seem to work, the encoding must be passed too; Future: deprecate unicode() in the code, as we want to support python 3' - SOLVED FOR NOW: added reload(sys) in gramps.py and set encoding to utf-8. Is there a better way that is userfriendly?

there is no longer automatic conversion to str utf-8 when using GTK functions, we must convert before passing to GTK.

glade can no longer work with our catalog. We need to upgrade comboboxentry to combobox with has_entry manually, and hope editors keep working... - Solved: Although our catalog cannot be opened, we can use glade with undefined elements without issues.

menu.popup does not seem to work in some instances. Solved: Make sure the reference to menu survives, so eg, do self.menu= function, then self.menu.popup. Alternatively, passing position function seems to also work as workaround, see grampsbar.py for example

Many Gtk elements no longer grab certain events. Solved: Add a Gtk.EventBox under them to grab the event.