-
-
Notifications
You must be signed in to change notification settings - Fork 832
Added support for "node-gyp" build #61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…s but we don't want to depend on boost threads unless we really have to for now
…- all tests are passing on OS X 10.7 with boost 1.47 - todo: test on linux - refs TryGhost#48
Conflicts: src/async.h src/statement.h wscript
they still contain absolute paths
This is how node does it so let's stay consistent.
node-gyp configure All attempts to require('sqlite3') fail with "cannot find module 'bindings'" so I patched %BASE%\Release\sqlite3.js as follows
and now the example code in the README.md runs as expected. I have not tried to run the test suite yet. |
Sorry about the ugly formatting of that last comment. It looked fine before I hit the submit button. |
so you can no longer type 'npm install sqlite3' but have to manually install node-gyp beforehand? I'm a bit worried about the added complexity and users failing to install node-sqlite3. Do you recommend adding "npm install -g node-gyp" to the preinstall script? |
Still, shouldn't node-gyp look at the current node version and download the appropriate distribution? |
@kkaefer Well I know that @isaacs is leaning towards phasing out the preinstall script, most likely in favor of precompiled binaries, but that will take some modifications to npm I believe. The idea is that normal users shouldn't have to worry about compiling binaries (similar to how they download a .pkg or .msi now), and npm should have the module binaries ready to go when the user types in |
That's what it does! Downloads the .tar.gz for the current (minor) version that node is running. |
So you're saying that there are no changes in header files between patch levels? |
@kkaefer Correct, that and node minor versions have binary stability, so you don't need to target your specific node version, only the minor version. |
node might but not the v8 version that is bundled, in my experience. |
wow, I just checked and I'm delighted I'm wrong on that:
|
however a difference like this could mean that node 0.6.0 headers might not work on windows:
|
@springmeyer Thanks for pointing that out. This shouldn't happen anymore though, and I'll be keeping an eye on the node commits to make sure. |
This reverts commit 2b91175.
FYI I use node-sqlite3 on both Linux and Windows, and I emphatically 2012/3/7 Konstantin Kfer <
|
@springmeyer The latest version of |
This reverts commit f82a33f.
Looked at this again, but it seems like the most recent node stable (0.6.15) still comes with 1.1.16 which doesn't seem to include |
Yes, it does: https://github.com/joyent/node/blob/v0.6.15/deps/npm/node_modules/node-gyp/package.json It just doesn't install it separately. If you have a wscript, and a binding.gyp, and no explicit |
See also https://github.com/isaacs/npm/blob/master/lib/utils/read-json.js#L360 and a dozen of immediately following lines. |
Ah, so it's there but not in |
It's not in At least, If you need a separate install of And after a quick look at package.json it seems that it won't extend I know that node-gyp's |
@kkaefer It's like @isaacs said: If you want to have Hope that clears things up! |
When npm runs |
Hey guys, so this should take care of #60. I started with the current
windows
branch and worked from there. I created a gyp file for sqlite3 itself, and then declared that as a dependency in node-sqlite3's bindings.gyp file.Try it out and let me know what you think! Cheers!