Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 401047

Summary: media-sound/rhythmbox-0.12.8-r1: build failure with python3 as system default
Product: Gentoo Linux Reporter: Alexander Sulfrian <alexander>
Component: [OLD] GNOMEAssignee: Gentoo Linux Gnome Desktop Team <gnome>
Status: RESOLVED FIXED    
Severity: normal CC: gstreamer
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Alexander Sulfrian 2012-01-27 16:08:10 UTC
Hi,

if python3 is set as system default the build of rhythmbox fails with the following error:


make[3]: Entering directory `/var/tmp/portage/media-sound/rhythmbox-0.12.8-r1/work/rhythmbox-0.12.8/bindings/python'
( cd . && /usr/bin/python /usr/lib64/python2.7/site-packages/gtk-2.0/codegen/codegen.py \
	--register /usr/share/pygtk/2.0/defs/gtk-types.defs \
	--register /usr/share/gst-python/0.10/defs/gst-types.defs \
	--override rhythmdb.override \
	--prefix pyrhythmdb rhythmdb.defs ) > rhythmdb.c 
( cd . && /usr/bin/python /usr/lib64/python2.7/site-packages/gtk-2.0/codegen/codegen.py \
	--register /usr/share/pygtk/2.0/defs/gtk-types.defs \
	--register /usr/share/pygtk/2.0/defs/gdk-base-types.defs \
	--register /usr/share/gst-python/0.10/defs/gst-types.defs \
	--register rhythmdb.defs \
	--override rb.override \
	--prefix pyrb rb.defs ) > rb.c 
  File "/usr/lib64/python2.7/site-packages/gtk-2.0/codegen/codegen.py", line 429
    except argtypes.ArgTypeError, ex:
                                ^
SyntaxError: invalid syntax
make[3]: *** [rhythmdb.c] Error 1
make[3]: *** Waiting for unfinished jobs....
  File "/usr/lib64/python2.7/site-packages/gtk-2.0/codegen/codegen.py", line 429
    except argtypes.ArgTypeError, ex:

The ebuild shoud either patch the Makefile of rhythmbox to use python2 or use at least python_set_active_version from the python.eclass.

Reproducible: Always

Steps to Reproduce:
1. eselect python set 2 (if 2 is python3.1)
2. emerge media-sound/rhythmbox


Expected Results:  
Build should not fail with the python error.
Comment 1 Pacho Ramos gentoo-dev 2012-01-30 12:04:17 UTC
+  30 Jan 2012; Pacho Ramos <pacho@gentoo.org> rhythmbox-0.12.8-r1.ebuild:
+  Fix build/running when python3 is main interpreter, bug #401047 by Alexander
+  Sulfrian
+