Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

OSX install requires Python 2.7 #6859

Closed
jerith opened this issue Jan 13, 2014 · 4 comments
Closed

OSX install requires Python 2.7 #6859

jerith opened this issue Jan 13, 2014 · 4 comments

Comments

@jerith
Copy link

jerith commented Jan 13, 2014

When I try to install node.js on OSX 10.6 (which has Python 2.6.1) I get the following build error:

  rm -f /private/tmp/node-g9y1/node-v0.10.24/out/Release/libhttp_parser.a && ./gyp-mac-tool filter-libtool libtool  -static -o /private/tmp/node-g9y1/node-v0.10.24/out/Release/libhttp_parser.a /private/tmp/node-g9y1/node-v0.10.24/out/Release/obj.target/http_parser/deps/http_parser/http_parser.o
  File "./gyp-mac-tool", line 507
    return {k: self._ExpandVariables(data[k], substitutions) for k in data}
                                                               ^
SyntaxError: invalid syntax

The dict comprehension syntax was introduced in Python 2.7, which means this code path fails on Python 2.6. The line that failed above could easily be replaced with some like return dict((k, self._ExpandVariables(data[k], substitutions)) for k in data) but there would probably need to be a deeper audit of the Python code to make sure Python 2.6 is supported in all cases.

indutny added a commit to indutny/node that referenced this issue Jan 13, 2014
@indutny
Copy link
Member

indutny commented Jan 13, 2014

Should be fixed by #6861

@indutny
Copy link
Member

indutny commented Jan 13, 2014

May I ask you to give it a try?

@jerith
Copy link
Author

jerith commented Jan 13, 2014

A very similar fix does work for me, but it seems this is the kind of thing that should be fixed upstream.

@indutny
Copy link
Member

indutny commented Jan 13, 2014

Just opened an issue in their tracker https://code.google.com/p/gyp/issues/detail?id=402&thanks=402&ts=1389632782

shigeki referenced this issue in shigeki/node Apr 3, 2015
indutny added a commit to nodejs/node that referenced this issue Apr 4, 2015
Fixes: nodejs/node-v0.x-archive#6859
PR-URL: #1325
Reviewed-By: Fedor Indutny <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Shigeki Ohtsu <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants