GNOME Bugzilla – Bug 687743
Provide pygobject for python 2 and 3
Last modified: 2012-11-07 07:27:14 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.
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.
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.
Review of attachment 228233 [details] [review]: This looks correct to me.
Comment on attachment 228233 [details] [review] Switch pygobject to python3, add pygobject-python2 project Pushed, thanks for the review!
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.