gyp.js
gyp.js copied to clipboard
Use cases
Given #9 it seems that this project needs to define its own targets. Here a suggested list:
- Be a replacement for Python
gyp
(currently bundled intonode-gyp
), sonode-gyp
would includegyp.js
as dependency and Python would not be needed to build Node.js native addons. - Be able to produce
ninja
projects from Node.js (not just tiled to Node.js native addons), for example bud. - Be able to compile a newer version of Node.js from an older version of Node.js (?)
Thank you for bringing it up, @ibc !
The bigger our goals - the longer it will take us to get there. Thus, I think that it may be a good idea to start small with node.js addons and node-gyp, and eventually come to the full support of all GYP features.
This doesn't mean that gyp.js won't be usable in its current form for the most of the projects though.
Getting rid of the python dependency in node-gyp would make a lot of people happy campers
Nice. I hope use-case 2 above will be implemented in the future, so I can replace Python gyp
with gyp.js
in my project :)
4. Bootstrap and build any version of node without a node binary using Duktape + duktape bindings + C++ compiler.
The way I see it compiling addons or Node itself are not that different, are they? Then there is the bootstraping issue.
I wonder whether with gyp.js
something like gyp_bud could be replaced by a pure JS API, so there is no even need to launch a child process to run gyp.js
.
@ibc yeah, this would be great. On other hand, embedding it in gypkg should be good too ;)
Sorry for coming back to this issue with an off-topic question:
Given that there is no activity in this project and given that GYP does not receive support for Python 3, which is the expectation within the next 2 years? Python 2 will be deprecated in 2020. Why didn't Node move to gyp.js
as the proper migration path? What should we expect those who also run projects that depend on GYP and don't want to also depend on Python 2 forever?
The Node.js project is forking GYP, and the first item in the backlog is python3 support.
We already landed it for node-gyp
https://github.com/nodejs/node-gyp/pull/1335
You can follow the progress at https://github.com/refack/GYP which might soon move to the nodejs org.
BTW I do plan on integrating gyp.js into GYP to have it cross-runtime portable.
Thanks for the update, @refack.