Commit
* fixes #2480
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,18 +4,20 @@ import sys | |
|
||
script_dir = os.path.dirname(__file__) | ||
node_root = os.path.normpath(os.path.join(script_dir, os.pardir)) | ||
node_tools = os.path.join(node_root, 'lib', 'node', 'tools') | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong. |
||
|
||
sys.path.insert(0, os.path.join(node_root, 'tools', 'gyp', 'pylib')) | ||
sys.path.insert(0, os.path.join(node_tools, 'gyp', 'pylib')) | ||
This comment has been minimized.
Sorry, something went wrong.
TooTallNate
|
||
import gyp | ||
|
||
if __name__ == '__main__': | ||
args = sys.argv[1:] | ||
addon_gypi = os.path.join(node_root, 'tools', 'addon.gypi') | ||
common_gypi = os.path.join(node_root, 'common.gypi') | ||
addon_gypi = os.path.join(node_tools, 'addon.gypi') | ||
common_gypi = os.path.join(node_root, 'lib', 'node', 'common.gypi') | ||
args.extend(['-I', addon_gypi]) | ||
args.extend(['-I', common_gypi]) | ||
args.extend(['-Dlibrary=shared_library']) | ||
args.extend(['-Dvisibility=default']) | ||
args.extend(['-Dnode_root_dir=%s' % node_root]) | ||
args.extend(['--depth=.']); | ||
|
||
gyp_args = list(args) | ||
|
1 comment
on commit 3d1476a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reverted in next commit. Addon building via GYP to depend on the node source tree. NPM will support binary uploads.
Why not just leave these? That way node-gyp will still work when run relative to the source dir, as well as when installed. Or if there's some other way to distinguish that, idk.