After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 687743 - Provide pygobject for python 2 and 3
Provide pygobject for python 2 and 3
Status: RESOLVED FIXED
Product: jhbuild
Classification: Infrastructure
Component: module sets
3.8.x
Other Linux
: Normal normal
: ---
Assigned To: Jhbuild maintainers
Jhbuild QA
Depends on: 687692
Blocks:
 
 
Reported: 2012-11-06 10:49 UTC by Martin Pitt
Modified: 2012-11-07 07:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Switch pygobject to python3, add pygobject-python2 project (1.81 KB, patch)
2012-11-06 10:51 UTC, Martin Pitt
committed Details | Review

Description Martin Pitt 2012-11-06 10:49:55 UTC
One of GNOME 3.8's goals is to port everything to Python 3. I discussed the impact of this on pygobject on d-d-l:

  https://mail.gnome.org/archives/desktop-devel-list/2012-November/msg00005.html

The summary from that was:

 * pygobject should grow a --with-python=<python path or name> argument. Done in

     http://git.gnome.org/browse/pygobject/commit/?id=6d8b29ba56fb08

 * pygobject should default to Python 3. Done in

     http://git.gnome.org/browse/pygobject/commit/?id=4e5556a523

   That means jhbuild will now build pygobject for Python 3 by default.

 * jhbuild should get a fake pygobject-python2 object which builds pygobject for Python 2. I created a patch for this which I'd appreciate feedback for, whether it's the right approach.

 * After above gets settled, I figure we should change all current dependencies to "pygobject" to "pygobject-python2" and ask module maintainers to switch them back once they ported to py3. With that we can easily see what's still left by grepping for pygobject-python2.
Comment 1 Martin Pitt 2012-11-06 10:51:10 UTC
Created attachment 228233 [details] [review]
Switch pygobject to python3, add pygobject-python2 project

That's the mentioned patch, feedback appreciated.

I didn't prepare the patch for switching the dependencies yet, I'll do that once we agree to the shape and form of this one.
Comment 2 Martin Pitt 2012-11-06 11:01:41 UTC
Please note that --with-python=python2 will currently not work on Debian, as their release team does not want the /usr/bin/python2 symlink in Wheezy yet (it will land after Wheezy's release). Colin Walters proposed a patch to create a ~/.local/bin/python2 symlink if there is no "python2" in the system, in bug 687692.
Comment 3 Colin Walters 2012-11-06 16:37:49 UTC
Review of attachment 228233 [details] [review]:

This looks correct to me.
Comment 4 Martin Pitt 2012-11-07 07:26:06 UTC
Comment on attachment 228233 [details] [review]
Switch pygobject to python3, add pygobject-python2 project

Pushed, thanks for the review!
Comment 5 Martin Pitt 2012-11-07 07:27:14 UTC
As discussed above, I also pushed the "pygobject" → "pygobject-python2" dependency change:

 http://git.gnome.org/browse/jhbuild/commit/?id=062c028c48603

I kept meta-gnome-extended-devel-platform as "pygobject" though, in the spirit of defaulting to Python 3 now.