Skip to content

Commit

Permalink
configure: use "path-array" for PYTHONPATH
Browse files Browse the repository at this point in the history
  • Loading branch information
TooTallNate committed May 24, 2015
1 parent 1ccaef6 commit ff88e5f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/configure.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ var fs = require('graceful-fs')
, semver = require('semver')
, mkdirp = require('mkdirp')
, cp = require('child_process')
, PathArray = require('path-array')
, extend = require('util')._extend
, spawn = cp.spawn
, execFile = cp.execFile
Expand Down Expand Up @@ -331,9 +332,8 @@ function configure (gyp, argv, callback) {
argv.unshift(gyp_script)

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

var cp = gyp.spawn(python, argv)
cp.on('exit', onCpExit)
Expand Down

0 comments on commit ff88e5f

Please sign in to comment.