-
Notifications
You must be signed in to change notification settings - Fork 671
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
Building ssh2 without Python installed #1297
Comments
That is not correct. All compilable addons used by Also just as a heads up, all node.js compilable addons use Python (indirectly via node-gyp) as part of the standard build system. |
@mscdex Thanks for the quick reply. Could you try to run |
Does |
@mscdex Thank you for your response and clarification. I can confirm that ssh2 is displayed in the list when I run However, my concern is about the errors displayed on the screen during the installation of my package, which has ssh2 as a dependency. The errors might confuse users or make them think that something went wrong during the installation process. Is there any way to suppress these errors or provide a better user experience during the installation of ssh2 without having Python installed? I understand that Python is required for building native modules via node-gyp, but I'm looking for a way to improve the installation experience for users who don't have Python installed. Any suggestions or workarounds would be greatly appreciated. |
Unfortunately it's not that easy. The As far as the bundled optional addon goes, we attempt to build that explicitly at package installation time, but it's tricky because the only way to remedy the error output issue would be to use a command line flag to optionally show the output (in case people want to know why it wasn't installing properly) and package managers haven't really standardized on if/how custom command line flags are passed to package scripts. I believe npm still passes them as individual environment variables or something, but IIRC other package managers don't provide them at all. I suppose another solution could be setting an environment variable beforehand, but I haven't looked to see if those are passed on to install scripts either. |
@mscdex Thank you for your detailed response and explanation of the challenges involved in suppressing the error output during the installation process. As a workaround, I ended up creating a custom package called Here's the link to the new I appreciate your help and guidance on this issue. If you have any feedback or suggestions for the custom package, please feel free to share them with me. |
Unfortunately providing pre-built addons is not really feasible at this time for a variety of reasons. I even previously created my own set of tools while exploring the subject because I found the existing solutions lacking. Basically the issue is that support for pre-built addons needs to be standardized but package manager devs can't seem to come together to do so (e.g. this npm RFC issue and this yarn issue on the subject). Last year I outlined what's really needed to provide a good solution for pre-built binaries that unfortunately seems to have fallen on deaf ears. You can accomplish some of this with a |
I believe there are some native modules that require Python to be installed in order to build ssh2. Is there another version or some workaround to build it without having Python installed (unfortunately this is a constraint)?
The text was updated successfully, but these errors were encountered: