Bug#678354: libpeas: Build a Python 3 loader

Barry Warsaw barry at python.org
Thu Jun 21 02:52:39 UTC 2012


Package: libpeas
Version: 1.4.0-2
Severity: normal

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Dear Maintainer,

Upstream libpeas supports both Python 2 and Python 3.  As part of our effort
in Ubuntu to promote Python 3, we'd like to be able to load Python 3 libpeas
plugins.

Enabling Python 3 plugins is a fairly simple matter of recompiling the libpeas
with $PYTHON=python3.  We want to prevent using both Python 2 and Python 3
plugins in the same application, but of course we want to continue to allow
different applications on the same system to use either Python 2 or Python 3.
Fortunately, we can do this without any changes to the code.

The approach taken here is to essentially build libpeas twice, into two
separatre build directories.  The first build is the normal one, which builds
the Python 2 version.  The second build builds into tmp-py3, but the only
thing we need from the second build is the libpythonloader.so, which must be
renamed to libpython3loader.so.  This allows an application to enable both the
Python 2 and Python 3 loader, but the first one loaded wins.  You can see how
this works by running the peas-demo program.  After loading either the Python
2 or Python 3 plugin, the second one will properly fail to load, without
causing any other problems.

Hopefully the changes in the debdiff make sense.  Thanks to Dmitrij Ledkovs
for helping figure out the cdbs flavors magic.


- -- System Information:
Debian Release: wheezy/sid
  APT prefers precise-updates
  APT policy: (500, 'precise-updates'), (500, 'precise-security'), (500, 'precise'), (100, 'precise-backports')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-25-generic (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQIcBAEBCAAGBQJP4ox3AAoJEBJutWOnSwa/4d0P/1ED6J4NAJKtFqGqzueXE5wS
3cuDanZOEFNzA0RtnHxt/CpE2+qPQfbwgziwRiAs4RwBiL6tdDCvJaXg4NFcoDo+
UGYmW/iv20LmklqiUEVWsYy+b5tB4uqHHV/Qz6QlMdL7NZtYrYKymShUnxeD196D
vcit8tVk7h6+N0WKkNbywJwOWaq71FdT0TV7PcJHadYQo+q6j7f4i2qOpgu3VKUE
X6i9sYYYWTQug5E4MdlT2kND10sYDCaiX2otHXcgvCQORqIEjKULsahiosmON756
vkeSw6i5JFRZ5CrzfbSysaoVtnJ/SQDXcjrBG4+H6QQRIZoWn7Ra88HVb/kqxver
6LaJeup2xhlr7BcLlyfIz4YTZneVB88mkNuMbbnpXSEhw3GbCPsJMNzOhI7Lz6G1
b09PJgtceBbfriKOfzlf9nJB/B7M0zz2LriYvvHi26g6mRGTm4jeH/QidnLxUcDj
PMmIDqFfRg5BdOicfV9jtm8mcKPyI07JIpvyvB12KlSoW1jY0ff5FnuAGL8JSJWo
hsYHYwVxPEOz5QH79QZVOGFypHUkm3cF1N96C2ifvgyM61+fBLetvM7FpMCmnMWM
V7RS+2gO/s7IkqydVN1b8/aXF1eUXr4w/hylF3NSBE+MlUn3R6Drv0iLwI+kf62T
UJ1YjfnaaCgjXIIDtVWr
=MvZR
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libpeas-python3.debdiff
Type: text/x-diff
Size: 9665 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-gnome-maintainers/attachments/20120620/f1e1de0f/attachment-0001.diff>


More information about the pkg-gnome-maintainers mailing list