Skip to content

Commit ff88e5f

Browse files
committed
configure: use "path-array" for PYTHONPATH
1 parent 1ccaef6 commit ff88e5f

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

lib/configure.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ var fs = require('graceful-fs')
1313
, semver = require('semver')
1414
, mkdirp = require('mkdirp')
1515
, cp = require('child_process')
16+
, PathArray = require('path-array')
1617
, extend = require('util')._extend
1718
, spawn = cp.spawn
1819
, execFile = cp.execFile
@@ -331,9 +332,8 @@ function configure (gyp, argv, callback) {
331332
argv.unshift(gyp_script)
332333

333334
// make sure python uses files that came with this particular node package
334-
var pypath = process.env.PYTHONPATH ? [process.env.PYTHONPATH] : []
335-
pypath.unshift(path.resolve(__dirname, '..', 'gyp', 'pylib'))
336-
process.env.PYTHONPATH = pypath.join(process.platform === "win32" ? ";" : ":");
335+
var pypath = new PathArray(process.env, 'PYTHONPATH')
336+
pypath.unshift(path.join(__dirname, '..', 'gyp', 'pylib'))
337337

338338
var cp = gyp.spawn(python, argv)
339339
cp.on('exit', onCpExit)

0 commit comments

Comments
 (0)