Support both Python 2 and Python 3 plugins

Bug #1015868 reported by Barry Warsaw
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libpeas (Debian)
Fix Released
Unknown
libpeas (Ubuntu)
Fix Released
High
Barry Warsaw

Bug Description

Upstream libpeas supports both Python 2 and Python 3, however the Debian packaging only builds for Python 2. By using a second build, and pulling out just the libpythonloader.so and renaming it to libpython3loader.so, we can support any single application enabling both the Python 2 and Python 3 loaders, although only the first loader used will "win". This means that a single application can use either the Python 2 *or* Python 3 loader, but not both. However, other applications on the same system can use whichever Python loader they want.

Attached is a debdiff that I've submitted to Debian. I'll link to the Debian bug shortly. I've built this new version in ppa:barry/python so you can test it out. Try installing the libpeas-docs package and then running peas-demo.

After review of the debdiff (sadly the UDD importer has a broken source branch), I'll upload to Quantal.

This bug is of high priority because of the need to support Python 3 on the desktop images.

Revision history for this message
Barry Warsaw (barry) wrote :
Changed in libpeas (Ubuntu):
assignee: nobody → Barry Warsaw (barry)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libpeas - 1.4.0-2ubuntu3

---------------
libpeas (1.4.0-2ubuntu3) quantal; urgency=low

  * No change rebuild. LP: #1015868
 -- Barry Warsaw <email address hidden> Thu, 21 Jun 2012 10:42:57 -0400

Changed in libpeas (Ubuntu):
status: New → Fix Released
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

* dependency on quilt is not necessary
* including quilt.mk is not necessary
as the package is 3.0 (quilt), when you just dropped a patch in in the unpacked tree you either need to manually run quilt push -a, or let dpkg-source -S figure it out for you.

* Instead of fiddling with the dest-install dirs, it is possible to set this variable:
DEB_DH_INSTALL_SOURCEDIR = debian/tmp/py2
and then the default dh_install will run with `--sourcedir=py2`

* sample & autoreconf are good =)

* Why did you do a no-change rebuild, usually a reason is specified? Was it to just close the bug?

* There are other loaders, gjs and seed which are currently not build, but could be supported. I will followup with an interation patch to debian.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

* when submitting debdiffs to debian, they should be:
- against debian source
- changelog as an nmu.1 version targeting unstable
- ubuntu specific changes removed

in ubuntu we do not build seed plugin, but debian does.

Revision history for this message
Barry Warsaw (barry) wrote : Re: [Bug 1015868] Re: Support both Python 2 and Python 3 plugins

On Jun 21, 2012, at 10:56 PM, Dmitrijs Ledkovs wrote:

>* dependency on quilt is not necessary
>* including quilt.mk is not necessary
>as the package is 3.0 (quilt), when you just dropped a patch in in the unpacked tree you either need to manually run quilt push -a, or let dpkg-source -S figure it out for you.

http://build-common.alioth.debian.org/cdbs-doc.html#id2562302

seems to indicate otherwise.

>* Instead of fiddling with the dest-install dirs, it is possible to set this variable:
>DEB_DH_INSTALL_SOURCEDIR = debian/tmp/py2
>and then the default dh_install will run with `--sourcedir=py2`
>
>* sample & autoreconf are good =)
>
>* Why did you do a no-change rebuild, usually a reason is specified? Was
>it to just close the bug?

Yes.

>* There are other loaders, gjs and seed which are currently not build,
>but could be supported. I will followup with an interation patch to
>debian.

Thanks.

Revision history for this message
Barry Warsaw (barry) wrote :

On Jun 21, 2012, at 11:00 PM, Dmitrijs Ledkovs wrote:

>* when submitting debdiffs to debian, they should be:
>- against debian source
>- changelog as an nmu.1 version targeting unstable
>- ubuntu specific changes removed
>
>in ubuntu we do not build seed plugin, but debian does.

Maybe there already is, but shouldn't we have documentation somewhere,
probably the Ubuntu packaging guide for best practices on submitting debdiffs
to Debian? Or better yet, a tool to DTRT.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

On 22/06/12 00:26, Barry Warsaw wrote:
> On Jun 21, 2012, at 10:56 PM, Dmitrijs Ledkovs wrote:
>
>> * dependency on quilt is not necessary
>> * including quilt.mk is not necessary
>> as the package is 3.0 (quilt), when you just dropped a patch in in the unpacked tree you either need to manually run quilt push -a, or let dpkg-source -S figure it out for you.
>
> http://build-common.alioth.debian.org/cdbs-doc.html#id2562302
>
> seems to indicate otherwise.
>

That was written before quilt integration moved into dpkg source package
itself as "3.0 (quilt)" format.

cat debian/source/format

If it has 1.0 or that file doesn't exists, then manually dh $@ --with
quilt needs to be used and the snippet added to cdbs.

With 3.0 (quilt), dpkg does the patch applying at unpack.

libpeas source package is 3.0 (quilt) format already (to gain .xz
tarball support).

http://wiki.debian.org/Projects/DebSrc3.0

>> * Instead of fiddling with the dest-install dirs, it is possible to set this variable:
>> DEB_DH_INSTALL_SOURCEDIR = debian/tmp/py2
>> and then the default dh_install will run with `--sourcedir=py2`
>>
>> * sample & autoreconf are good =)
>>
>> * Why did you do a no-change rebuild, usually a reason is specified? Was
>> it to just close the bug?
>
> Yes.
>

Ok. Resulted in a bit of mirroring bandwidth around the world, but not
too much. It's not like the packages are several 100 MB.

>> * There are other loaders, gjs and seed which are currently not build,
>> but could be supported. I will followup with an interation patch to
>> debian.
>
> Thanks.
>

--
Regards,
Dmitrijs.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

On 22/06/12 00:28, Barry Warsaw wrote:
> On Jun 21, 2012, at 11:00 PM, Dmitrijs Ledkovs wrote:
>
>> * when submitting debdiffs to debian, they should be:
>> - against debian source
>> - changelog as an nmu.1 version targeting unstable
>> - ubuntu specific changes removed
>>
>> in ubuntu we do not build seed plugin, but debian does.
>
> Maybe there already is, but shouldn't we have documentation somewhere,
> probably the Ubuntu packaging guide for best practices on submitting debdiffs
> to Debian? Or better yet, a tool to DTRT.
>

Well there is submittodebian, but it is not very intelligent, it expects
the user to know which bits need removing and are ubuntu specific...

pull-debian-source -> reapply relevant bits seems to be the easiest/best
way to do it. Not ideal =/

--
Regards,
Dmitrijs.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

debdiff for debian, emailed to bts as well.

Revision history for this message
Barry Warsaw (barry) wrote :

On Jun 22, 2012, at 08:34 AM, Dmitrijs Ledkovs wrote:

>That was written before quilt integration moved into dpkg source package
>itself as "3.0 (quilt)" format.
>
>cat debian/source/format
>
>If it has 1.0 or that file doesn't exists, then manually dh $@ --with
>quilt needs to be used and the snippet added to cdbs.
>
>With 3.0 (quilt), dpkg does the patch applying at unpack.
>
>libpeas source package is 3.0 (quilt) format already (to gain .xz
>tarball support).
>
>http://wiki.debian.org/Projects/DebSrc3.0

I'll just note that without adding the dependency and quilt.mk, the patch did
*not* get applied on build. When I noticed this effect, and saw the note in
the cdbs documentation, I added those bits and then the build worked. I
didn't chase it down further (since by all accounts, I was now doing the right
thing) so perhaps there was something else going on.

In any case, if these are no longer necessary, then it's a bug in the cdbs
documentation. I'm not particularly motivated by a love of cdbs to want to
submit a bug report or patch. :)

Changed in libpeas (Debian):
status: Unknown → New
Changed in libpeas (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.