File tree Expand file tree Collapse file tree 2 files changed +29
-26
lines changed Expand file tree Collapse file tree 2 files changed +29
-26
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ # Locate python2 interpreter and re-execute the script. Note that the
4+ # mix of single and double quotes is intentional, as is the fact that
5+ # the ] goes on a new line.
6+ _=[ ' exec' ' /bin/sh' ' -c' ' ' '
7+ which python2.7 >/dev/null && exec python2.7 "$0" "$@"
8+ which python2 >/dev/null && exec python2 "$0" "$@"
9+ exec python "$0" "$@"
10+ ' ' ' " $0 " " $@ "
11+ ]
12+ del _
13+
14+ import sys
15+ from distutils.spawn import find_executable as which
16+ if sys.version_info[0] ! = 2 or sys.version_info[1] not in (6, 7):
17+ sys.stderr.write(' Please use either Python 2.6 or 2.7' )
18+
19+ python2 = which(' python2' ) or which(' python2.6' ) or which(' python2.7' )
20+
21+ if python2:
22+ sys.stderr.write(' :\n\n' )
23+ sys.stderr.write(' ' + python2 + ' ' + ' ' .join(sys.argv))
24+
25+ sys.stderr.write(' \n' )
26+ sys.exit(1)
27+
28+ import configure
Original file line number Diff line number Diff line change 1- #! /bin/sh
2-
3- # Locate python2 interpreter and re-execute the script. Note that the
4- # mix of single and double quotes is intentional, as is the fact that
5- # the ] goes on a new line.
6- _=[ ' exec' ' /bin/sh' ' -c' ' ' '
7- which python2.7 >/dev/null && exec python2.7 "$0" "$@"
8- which python2 >/dev/null && exec python2 "$0" "$@"
9- exec python "$0" "$@"
10- ' ' ' " $0 " " $@ "
11- ]
12- del _
13-
141import sys
15- from distutils.spawn import find_executable as which
16- if sys.version_info[0] ! = 2 or sys.version_info[1] not in (6, 7):
17- sys.stderr.write(' Please use either Python 2.6 or 2.7' )
18-
19- python2 = which(' python2' ) or which(' python2.6' ) or which(' python2.7' )
20-
21- if python2:
22- sys.stderr.write(' :\n\n' )
23- sys.stderr.write(' ' + python2 + ' ' + ' ' .join(sys.argv))
24-
25- sys.stderr.write(' \n' )
26- sys.exit(1)
27-
282import errno
293import optparse
304import os
359import subprocess
3610import shutil
3711import string
12+ from distutils .spawn import find_executable as which
3813
3914# If not run from node/, cd to node/.
4015os .chdir (os .path .dirname (__file__ ) or '.' )
You can’t perform that action at this time.
0 commit comments