Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lib/configure.js
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,9 @@ function configure (gyp, argv, callback) {
argv.unshift(gyp_script)

// make sure python uses files that came with this particular node package
process.env.PYTHONPATH = path.resolve(__dirname, '..', 'gyp', 'pylib')
var pypath = process.env.PYTHONPATH ? [process.env.PYTHONPATH] : []
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Funnily enough, this would be a good use-case for my path-array module.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good, if you don't mind the extra dependency just for these couple of lines - I didn't know about that module. Want me to redo the PR, or are you happy to do that since you're presumably pretty familiar with it?

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