Skip to content

Commit

Permalink
Revert "configure: use "path-array" for PYTHONPATH"
Browse files Browse the repository at this point in the history
This reverts commit ff88e5f.

Of the 5.5MB footprint of node-gyp, path-array makes up 3.6MB.

Removing this reduces the weight of npm (and thus node) appreciably.

PR-URL: #990
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
  • Loading branch information
mhart authored and bnoordhuis committed Oct 7, 2016
1 parent 9c8d275 commit 7c08b85
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 @@ -14,7 +14,6 @@ var fs = require('graceful-fs')
, semver = require('semver')
, mkdirp = require('mkdirp')
, cp = require('child_process')
, PathArray = require('path-array')
, extend = require('util')._extend
, processRelease = require('./process-release')
, spawn = cp.spawn
Expand Down Expand Up @@ -288,8 +287,9 @@ function configure (gyp, argv, callback) {
argv.unshift(gyp_script)

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

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

0 comments on commit 7c08b85

Please sign in to comment.