Skip to content

Commit dea2f3b

Browse files
committed
Allow specifying the python to use.
1 parent d07c8ab commit dea2f3b

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

README.md

+9
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,15 @@ Note, if building against homebrew-installed sqlite on OS X you can do:
9090

9191
npm install --build-from-source --sqlite=/usr/local/opt/sqlite/
9292

93+
By default the node-gyp install will use `python` as part of the installation. A
94+
different python executable can be specified on the command line.
95+
96+
npm install --build-from-source --python=/usr/bin/python2
97+
98+
This uses the npm_config_python config, so values in .npmrc will be honoured:
99+
100+
python=/usr/bin/python2
101+
93102
## Building for node-webkit
94103

95104
Because of ABI differences, `sqlite3` must be built in a custom to be used with [node-webkit](https://github.com/rogerwang/node-webkit).

deps/sqlite3.gyp

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
'outputs': [
5656
'<(SHARED_INTERMEDIATE_DIR)/sqlite-autoconf-<@(sqlite_version)/sqlite3.c'
5757
],
58-
'action': ['python','./extract.py','./sqlite-autoconf-<@(sqlite_version).tar.gz','<(SHARED_INTERMEDIATE_DIR)']
58+
'action': ['<!(node -p "process.env.npm_config_python || \\"python\\"")','./extract.py','./sqlite-autoconf-<@(sqlite_version).tar.gz','<(SHARED_INTERMEDIATE_DIR)']
5959
}
6060
],
6161
'direct_dependent_settings': {

0 commit comments

Comments
 (0)