Skip to content

Make adding node and python to PATH optional #705

@sbc100

Description

@sbc100

Neither emsdk nor emscripten requires that these be in the PATH.

We add them to the path anyway since it is convenient for some users to be able to to do:

$ emcc hello.c
$ node a.out.js

However, by adding our own python and node builds to the users path we are potentially screwing with any existing python and/node installations they might have. See #704 for an example of how our internal version of python can leak out in unexpected ways.

Proposed solution for python:

Lets just stop adding to the PATH. All our tools launch using .bat/sh files that honor EMSDK_PYTHON so we don't need it in the path. Also we don't want users who run pip to interfere with our internal version of python.

Proposed solutions(s) for node:

Option 1: Make adding node to the PATH optional. Perhaps on by default so users who have their own node would have to disable with it with --no-node-path?

Option 2: Add our version of node the PATH if and only if no version of node already exists there.

Option 2: Provide some kind of emrun or emnode script that will run under the configured version of node without having to place it in the PATH.

I suggest we remove python from the PATH ASAP since there is no reason that I know of not to.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions