-
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
build fails when python3 is default python #418
Comments
Try |
this there are hardcoded the ArchLinux AUR package basically swapped the header of all the
Wonder if there's easier way to do this? |
Something similar would have to be done on for instance FreeBSD. This has been brought up previously in the nodejs issue trackers where the conclusion was that maintaining a symlink for the user (python -> python27) was the simplest solution. I'm not super happy with that either and would like some simple detection. I don't think python3 will be supported until gyp is out of the picture. The effort for supporting python3 would be a pretty trivial task from there. |
on a couple of the build machines we take the easy path and symlink |
Another way could be changing configure from a python shebang to a shell shebang, do some simple checks for which python binary we'd like to use, then pass the rest of the configure to $PYTHON -c. It requires some minor rewriting of configure ( |
the problem is deeper, |
Yeah, I thought 2.7.x series was a requirement (as it is for gyp/node-gyp) I wouldn't be surprised if this is closed (wontfix) by an authority. |
Is this a v8 issue and not fixable from our end? |
Yes, both a V8 and a gyp issue. Not much we can do about that. Closing, sorry. |
Remove the patches to use a python variable and instead force python2 into the PATH. Upstream the python variable was recently removed (see nodejs/node@c3e50ca) and due to dependencies directly calling python there is a reluctance to change this. Instead it is recommended to add python2 into PATH as the nodejs build machines do (see nodejs/node#418 and nodejs/node#2735). Signed-off-by: Martin Bark <martin@barkynet.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
just want to +1 this also and hope it can be re-opened, as referred to by @jbergstroem when he closed my similar issue in #6249. python 3.x has been out for a while and all make scripts ( |
It should be noted that the current Ubuntu LTS 16.04 is Python 3 only. I took a quick glance at the Python scripts invoked and I don't see a reason why they couldn't be written in a way that works for Python 2 and 3 |
@crccheck I bet there's way to install python2. As you can see above, we rely on gyp accepting python3 support before starting to converge our own toolset. We're not against supporting Python 3 – rather for – but its out of our hands at the moment. If you insist on leaning or adding valuable time, I would suggest helping to get python 3 support in gyp land; reckon there'll be feedback from upstream that needs addressing. |
as stated above, the problem lies that there are sections in node-gyp and the V8 engine that depend on python2 still, and until all those are solved, we're stuck. they have said they are working on it, but keep in mind, it means coordinating with the Google V8 team re-writing their stuff also for python2 or 3, depending on what a system has. best, — faddah |
Remove the patches to use a python variable and instead force python2 into the PATH. Upstream the python variable was recently removed (see nodejs/node@c3e50ca) and due to dependencies directly calling python there is a reluctance to change this. Instead it is recommended to add python2 into PATH as the nodejs build machines do (see nodejs/node#418 and nodejs/node#2735). Signed-off-by: Martin Bark <martin@barkynet.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Remove the patches to use a python variable and instead force python2 into the PATH. Upstream the python variable was recently removed (see nodejs/node@c3e50ca) and due to dependencies directly calling python there is a reluctance to change this. Instead it is recommended to add python2 into PATH as the nodejs build machines do (see nodejs/node#418 and nodejs/node#2735). Signed-off-by: Martin Bark <martin@barkynet.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Another workaround is setting up a virtual environment for python2. This worked for me with conda: |
The text was updated successfully, but these errors were encountered: