| Summary: | waf supplied with net-libs/nodejs-0.4.6 and 0.4.7 fails if python3 selected | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | JokeyRhyme <jokeyrhyme> |
| Component: | [OLD] Development | Assignee: | Patrick Lauer <patrick> |
| Status: | RESOLVED FIXED | ||
| Severity: | minor | CC: | alexander, drobbins, schamane |
| Priority: | Normal | ||
| Version: | unspecified | ||
| Hardware: | AMD64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
| Attachments: |
build.log showing waf script error
output of emerge --info on my system new nodejs-0.6.0.ebuild that would fix the python problems new nodejs-0.6.0.ebuild that would fix the python problems |
||
|
Description
JokeyRhyme
2011-04-24 06:11:49 UTC
Created attachment 270991 [details]
build.log showing waf script error
Created attachment 270993 [details]
output of emerge --info on my system
Summary of build.log:
>>> Configuring source in /var/tmp/portage/net-libs/nodejs-0.4.7/work/node-v0.4.7 ...
Traceback (most recent call last):
File "/var/tmp/portage/net-libs/nodejs-0.4.7/work/node-v0.4.7/tools/waf-light", line 157, in <module>
import Scripting
File "/var/tmp/portage/net-libs/nodejs-0.4.7/work/node-v0.4.7/tools/wafadmin/Scripting.py", line 146
except Utils.WafError, e:
^
SyntaxError: invalid syntax
A bug report on node.js tracker from the Arch Linux team: https://github.com/joyent/node/issues/501 This includes a potential patch that may allow node.js to be built with Python 3. for now you can get nodejs building reliably by adding this:
+src_prepare() {
+ cd ${S}
+ for x in $(grep -r "/usr/bin/env python" * | cut -f1 -d":" ); do
+ einfo "Tweaking $x for python2..."
+ sed -e "s:/usr/bin/env python:/usr/bin/env python2:g" -i $x || die
+ done
+ sed -e "s/python/python2/g" -i Makefile || die
+}
+
This hard-codes use of python2, which is what nodejs requires.
Then add =dev-lang/python-2* to DEPEND and RDEPEND.
Created attachment 292165 [details]
new nodejs-0.6.0.ebuild that would fix the python problems
The attached ebuild would fix the python problems using the python.eclass.
Created attachment 292167 [details]
new nodejs-0.6.0.ebuild that would fix the python problems
This used the ebuild from official portage as template.
+ 20 Feb 2012; Patrick Lauer <patrick@gentoo.org> nodejs-0.6.11.ebuild: + Restrict python to 2.* The committed change, does not fix the bug. It only add the python 2 dependency. But if python 3 is the system default python version, the ebuild fails during configuring. Maybe you want to take a look at the attached ebuild, how to properly fix it. |