Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Remove usage of non-portable which #346

Merged
merged 1 commit into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ environment::

$ workon my_env
$ npm install -g coffee-script
$ which coffee
$ command -v coffee
/home/monty/virtualenvs/my_env/bin/coffee

Creating a virtual environment with a custom prompt:
Expand Down
2 changes: 1 addition & 1 deletion README.ru.rst
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ python'а::

$ workon my_env
$ npm install -g coffee-script
$ which coffee
$ command -v coffee
/home/monty/virtualenvs/my_env/bin/coffee


Expand Down
8 changes: 2 additions & 6 deletions nodeenv.py
Original file line number Diff line number Diff line change
Expand Up @@ -707,12 +707,8 @@ def build_node_from_src(env_dir, src_dir, node_src_dir, args):
# Currently, the node.js build scripts are using python2.*,
# therefore we need to temporarily point python exec to the
# python 2.* version in this case.
try:
_, which_python2_output = callit(
['which', 'python2'], args.verbose, True, node_src_dir, env
)
python2_path = which_python2_output[0]
except (OSError, IndexError):
python2_path = shutil.which('python2')
if not python2_path:
raise OSError(
'Python >=3.0 virtualenv detected, but no python2 '
'command (required for building node.js) was found'
Expand Down