File tree 2 files changed +29
-26
lines changed
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
-
14
1
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
2
import errno
29
3
import optparse
30
4
import os
35
9
import subprocess
36
10
import shutil
37
11
import string
12
+ from distutils .spawn import find_executable as which
38
13
39
14
# If not run from node/, cd to node/.
40
15
os .chdir (os .path .dirname (__file__ ) or '.' )
You can’t perform that action at this time.
0 commit comments