Wednesday 17 February 2016

Splitting Python loaders in libpeas

Moving ahead with the plan to remove Python 2 from the default install
images[1] for Xenial, next up is splitting libpeas[2]. libpeas is a Gnome
framework for plugins that has Python 2 and 3 bindings, via extension modules
which applications can choose and load. They can't load both at the same time
of course.

libpeas-1.0-0 currently puts both loaders in the same binary package, thus
pulling in both interpreter stacks for all applications that depend on it,
even those that don't use Python extensions.

The fix should be fairly easy; split the loaders into their own individual
binary packages, e.g. libpeas-1.0-0-python2loader and
libpeas-1.0-0-python3loader. Then we just have to audit the existing
libpeas-1.0-0 rdeps and figure out which, if any, also have Python
dependencies. For each rdep that has a Python dependency, figure out if it's
Py2 or Py3 and add the explicit additional dependency on
libpeas-1.0-0-python{2,3}loader as appropriate.

Based on my (hopefully correct) analysis, the following packages need the
additional dependencies (the first column is the Python version):

3 * eog-plugins
3 * gedit
3 * gedit-plugins
3 * gnome-builder
2 * gtranslator
2 * liferea
3 * rhythmbox
3 * rhythmbox-plugins

I have these staged in my PPA[3].

Debian bug #806824 proposes the same split, but it has received no comments,
so we're not waiting for Debian. My plan is to upload the split peas and
above modified packages today.

If you're aware of any packages missing from the list above, or have any other
comments or questions, please follow up here or comment on the Launchpad bug.

Cheers,
-Barry

[1] https://blueprints.launchpad.net/ubuntu/+spec/foundations-x-python3-only
[2] https://bugs.launchpad.net/ubuntu/+source/libpeas/+bug/1440504
[3] https://launchpad.net/~barry/+archive/ubuntu/peasandqueues/+packages