()
| 15 | raise subprocess.CalledProcessError(return_code, cmd) |
| 16 | |
| 17 | def main(): |
| 18 | node_package_manager = 'npm' |
| 19 | # check if npm is installed on the system |
| 20 | if (shutil.which(node_package_manager) is None): |
| 21 | print(""" |
| 22 | |
| 23 | PythonMonkey Build Error: |
| 24 | |
| 25 | |
| 26 | * It appears npm is not installed on this system. |
| 27 | * npm is required for PythonMonkey to build. |
| 28 | * Please install NPM and Node.js before installing PythonMonkey. |
| 29 | * Refer to the documentation for installing NPM and Node.js here: https://nodejs.org/en/download |
| 30 | |
| 31 | |
| 32 | """) |
| 33 | raise Exception("PythonMonkey build error: Unable to find npm on the system.") |
| 34 | else: |
| 35 | execute(f"cd pythonmonkey && {node_package_manager} i --no-package-lock") # do not update package-lock.json |
| 36 | |
| 37 | if __name__ == "__main__": |
| 38 | main() |
no test coverage detected