Fix compilation if python3 is the default python

This commit is contained in:
Uwe L. Korn 2012-12-10 19:05:39 +01:00
parent 0a4d3a2944
commit 72bb240d5b
2 changed files with 5 additions and 0 deletions

2
bin/python Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
/usr/bin/env python2 $*

3
nvm.sh
View File

@ -247,6 +247,9 @@ nvm()
elif [ "`curl -Is "http://nodejs.org/dist/node-$VERSION.tar.gz" | grep '200 OK'`" != '' ]; then
tarball="http://nodejs.org/dist/node-$VERSION.tar.gz"
fi
# If python2 is available it should be used so that node compilation works on systems
# where python3 is the default python.
command -v python2 >/dev/null 2>&1 && export PATH=$NVM_DIR/bin:$PATH
if (
[ ! -z $tarball ] && \
mkdir -p "$NVM_DIR/src" && \