Why does node.js need python

前端 未结 2 1046
我在风中等你
我在风中等你 2020-12-08 13:57

I am starting up with node This is from node.js README.md

Prerequisites (Unix only):

* GCC 4.2 or newer
* Python 2.6 or 2.7
* GNU Make 3.81 or newer
         


        
相关标签:
2条回答
  • 2020-12-08 14:40

    Yes, node uses some python scripts under the hood, though Node is largely written in C++.

    See some of Node's python code here:

    https://github.com/joyent/node/tree/master/tools

    E.g., js2c.py converts Javascript into C-style char arrays:

    https://github.com/joyent/node/blob/master/tools/js2c.py

    In general, if a package tells you that it requires Python, then it is almost certainly using Python ;)

    0 讨论(0)
  • 2020-12-08 14:46

    Node.js is built with GYP — cross-platform built tool written in Python. Also some other build steps are implemented in Python. So Python is required for building node from source.

    But you also need Python for building native addons.

    0 讨论(0)
提交回复
热议问题