Skip to content

Commit bdb5d48

Browse files
committed
build: set Python semverRange: '>=2.7.0 <3.8.0'
1 parent 7e81270 commit bdb5d48

File tree

3 files changed

+13
-12
lines changed

3 files changed

+13
-12
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ matrix:
2929
python: 3.7
3030
before_install: nvm install 12
3131
allow_failures:
32+
- os: osx
3233
- os: windows
3334
install:
3435
#- pip install -r requirements.txt

lib/configure.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ PythonFinder.prototype = {
362362
log: logWithPrefix(log, 'find Python'),
363363
argsExecutable: ['-c', 'import sys; print(sys.executable);'],
364364
argsVersion: ['-c', 'import sys; print("%s.%s.%s" % sys.version_info[:3]);'],
365-
semverRange: '>=2.6.0 <3.0.0',
365+
semverRange: '>=2.7.0 <3.8.0',
366366

367367
// These can be overridden for testing:
368368
execFile: cp.execFile,

test/test-find-python.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ test('find python - python', function (t) {
5656
poison(f, 'execFile')
5757
t.strictEqual(program, '/path/python')
5858
t.ok(/sys\.version_info/.test(args[1]))
59-
cb(null, '2.7.15')
59+
cb(null, '3.6.7')
6060
}
6161
t.strictEqual(program,
6262
process.platform === 'win32' ? '"python"' : 'python')
@@ -100,7 +100,7 @@ test('find python - python too new', function (t) {
100100
if (/sys\.executable/.test(args[args.length-1])) {
101101
cb(null, '/path/python')
102102
} else if (/sys\.version_info/.test(args[args.length-1])) {
103-
cb(null, '3.0.0')
103+
cb(null, '3.8.0')
104104
} else {
105105
t.fail()
106106
}
@@ -134,19 +134,19 @@ test('find python - no python', function (t) {
134134
}
135135
})
136136

137-
test('find python - no python2', function (t) {
137+
test('find python - no python3', function (t) {
138138
t.plan(2)
139139

140140
var f = new TestPythonFinder(null, done)
141141
f.execFile = function(program, args, opts, cb) {
142142
if (/sys\.executable/.test(args[args.length-1])) {
143-
if (program == 'python2') {
143+
if (program == 'python3') {
144144
cb(new Error('not found'))
145145
} else {
146146
cb(null, '/path/python')
147147
}
148148
} else if (/sys\.version_info/.test(args[args.length-1])) {
149-
cb(null, '2.7.14')
149+
cb(null, '3.6.7')
150150
} else {
151151
t.fail()
152152
}
@@ -159,7 +159,7 @@ test('find python - no python2', function (t) {
159159
}
160160
})
161161

162-
test('find python - no python2, no python, unix', function (t) {
162+
test('find python - no python3, no python, unix', function (t) {
163163
t.plan(2)
164164

165165
var f = new TestPythonFinder(null, done)
@@ -197,7 +197,7 @@ test('find python - no python, use python launcher', function (t) {
197197
cb(new Error('not found'))
198198
} else if (/sys\.version_info/.test(args[args.length-1])) {
199199
if (program === 'Z:\\snake.exe') {
200-
cb(null, '2.7.14')
200+
cb(null, '3.6.7')
201201
} else {
202202
t.fail()
203203
}
@@ -224,7 +224,7 @@ test('find python - python 3, use python launcher', function (t) {
224224
f.execFile = function(program, args, opts, cb) {
225225
poison(f, 'execFile')
226226
if (/sys\.version_info/.test(args[args.length-1])) {
227-
cb(null, '2.7.14')
227+
cb(null, '3.6.7')
228228
} else {
229229
t.fail()
230230
}
@@ -236,7 +236,7 @@ test('find python - python 3, use python launcher', function (t) {
236236
if (/sys\.executable/.test(args[args.length-1])) {
237237
cb(null, '/path/python')
238238
} else if (/sys\.version_info/.test(args[args.length-1])) {
239-
cb(null, '3.0.0')
239+
cb(null, '3.8.0')
240240
} else {
241241
t.fail()
242242
}
@@ -282,7 +282,7 @@ test('find python - python 3, use python launcher, python 2 too old',
282282
if (/sys\.executable/.test(args[args.length-1])) {
283283
cb(null, '/path/python')
284284
} else if (/sys\.version_info/.test(args[args.length-1])) {
285-
cb(null, '3.0.0')
285+
cb(null, '3.8.0')
286286
} else {
287287
t.fail()
288288
}
@@ -308,7 +308,7 @@ test('find python - no python, no python launcher, good guess', function (t) {
308308
poison(f, 'execFile')
309309
t.ok(re.test(program))
310310
t.ok(/sys\.version_info/.test(args[args.length-1]))
311-
cb(null, '2.7.14')
311+
cb(null, '3.6.7')
312312
}
313313
return cb(new Error('not found'))
314314
}

0 commit comments

Comments
 (0)