Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 322677 - [gnome-overlay] dev-libs/gjs-0.6 (and 0.7) does not support python 3
Summary: [gnome-overlay] dev-libs/gjs-0.6 (and 0.7) does not support python 3
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 313471 gnome3
  Show dependency tree
 
Reported: 2010-06-03 19:52 UTC by Michael Weber (RETIRED)
Modified: 2012-02-12 14:11 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.