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

Bug 322677

Summary: [gnome-overlay] dev-libs/gjs-0.6 (and 0.7) does not support python 3
Product: Gentoo Linux Reporter: Michael Weber (RETIRED) <xmw>
Component: [OLD] GNOMEAssignee: Gentoo Linux Gnome Desktop Team <gnome>
Status: RESOLVED FIXED    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 313471, 353071    

Description Michael Weber (RETIRED) gentoo-dev 2010-06-03 19:52:05 UTC
There is a syntax error with python3.1 as default python.

>>> Compiling source in /var/tmp/portage/dev-libs/gjs-0.6/work/gjs-0.6 ...
make -j2 -j1 
TOP_SRCDIR=. DBUS_SESSION_BUS_ADDRESS='' XDG_DATA_HOME=test_user_data GJS_DEBUG_OUTPUT=test_user_data/logs/gjs.log BUILDDIR=. GJS_USE_UNINSTALLED_FILES=1 LD_LIBRARY_PATH=":/usr/lib/xulrunner-1.9.2" G_FILENAME_ENCODING=latin1  ./scripts/make-tests . gjs/jsapi-util-array.c gjs/jsapi-util-error.c gjs/jsapi-util-string.c gjs/stack.c util/glib.c
  File "./scripts/make-tests", line 29
    except OSError, e:
                  ^
SyntaxError: invalid syntax
make: *** [gjstest.h.stamp] Error 1


You can easily fix this by adding PYTHON_DEPEND="2" before an additional `inherit python` and call `python_set_active_verion 2` as a new last line of pkg_setup().
Comment 1 Michael Weber (RETIRED) gentoo-dev 2010-06-06 00:18:53 UTC
or - maybe better - by 

-- ../gnome/dev-libs/gjs/gjs-0.6.ebuild        2010-06-05 21:19:27.000000000 +0000
+++ dev-libs/gjs/gjs-0.7.ebuild 2010-06-06 01:53:28.000000000 +0000
@@ -4,7 +4,9 @@
 
 EAPI="2"
 
-inherit gnome2
+PYTHON_DEPEND="2"
+
+inherit gnome2 python
 
 DESCRIPTION="Javascript bindings for GNOME"
 HOMEPAGE="http://live.gnome.org/Gjs"
@@ -37,6 +39,11 @@
        MAKEOPTS="${MAKEOPTS} -j1"
 }
 
+src_prepare() {
+       gnome2_src_prepare
+       python_convert_shebangs -r 2 .
+}
+
 src_install() {
        gnome2_src_install

which changes the shebang of scripts/make-tests 
Comment 2 Gilles Dartiguelongue (RETIRED) gentoo-dev 2010-10-22 22:49:53 UTC
Fixed in overlay. Thanks for reporting.