-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tools: fix GYP ninja generator for Python 3 #29416
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please replace the filter() calls with list comprehensions as discussed at https://docs.python.org/3.0/library/functions.html#filter
@cclauss better? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this do? How do I test it? AFAICT, python3 doesn't run on configure.py before or after this PR:
w/node (master $ u=) % python3 configure.py --ninja
Traceback (most recent call last):
File "configure.py", line 28, in <module>
from gyp.common import GetFlavor
File "tools/gyp/pylib/gyp/__init__.py", line 37
print '%s:%s:%d:%s %s' % (mode.upper(), os.path.basename(ctx[0]),
^
SyntaxError: invalid syntax
w/node (master $ u=) % git pr 29416 upstream
remote: Enumerating objects: 3044, done.
remote: Counting objects: 100% (3044/3044), done.
remote: Total 4164 (delta 3044), reused 3044 (delta 3044), pack-reused 1120
Receiving objects: 100% (4164/4164), 4.95 MiB | 4.01 MiB/s, done.
Resolving deltas: 100% (3346/3346), completed with 2070 local objects.
From github.com:nodejs/node
* [new ref] refs/pull/29416/head -> upstream/pr/29416
w/node (master $ u=) % python3 configure.py --ninja
Traceback (most recent call last):
File "configure.py", line 28, in <module>
from gyp.common import GetFlavor
File "tools/gyp/pylib/gyp/__init__.py", line 37
print '%s:%s:%d:%s %s' % (mode.upper(), os.path.basename(ctx[0]),
^
SyntaxError: invalid syntax
This fixes |
Python 3.6 vs Python 3.7 maybe? |
I'm on python 3.7.4, which versions are you all using?
|
This is a macOS-only issue that @ryzokuken is working on. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much!
This is usually a sign that the thing on the left is bytes while the thing on the right is str. |
Noted! I'll try to dig deeper. |
Landed in af161f0 |
PR-URL: #29416 Reviewed-By: Christian Clauss <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Ujjwal Sharma <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
@nodejs/lts this needs to land on 12.x-staging, |
12.x isn't LTS yet. This commit will be in the next release |
Related to #29415 |
Note that just cherry-picking af161f0 onto 12.x-staging doesn't fix ninja. I started to try to figure out why, but I've been called away to look at something else before making progress. |
PR-URL: #29416 Reviewed-By: Christian Clauss <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Ujjwal Sharma <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
No description provided.