Skip to content

Instantly share code, notes, and snippets.

@jbergstroem
Created November 15, 2011 11:55
Show Gist options
  • Save jbergstroem/1366902 to your computer and use it in GitHub Desktop.
Save jbergstroem/1366902 to your computer and use it in GitHub Desktop.
Node/gyp: Add support for python3
diff --git a/configure b/configure
index 0ec745c..3296c10 100755
--- a/configure
+++ b/configure
@@ -211,7 +211,7 @@ def configure_openssl(o):
o['variables']['node_use_system_openssl'] = 'false'
-print "configure options:", options
+print("configure options:", options)
output = {
'variables': {},
@@ -237,7 +237,7 @@ output = {
}
fn = os.path.join(root_dir, 'options.gypi')
-print "creating ", fn
+print("creating ", fn)
f = open(fn, 'w+')
f.write("# Do not edit. Generated by the configure script.\n")
diff --git a/tools/gyp_node b/tools/gyp_node
index 07da2ee..9c5d2ac 100755
--- a/tools/gyp_node
+++ b/tools/gyp_node
@@ -17,7 +17,7 @@ output_dir = os.path.join(os.path.abspath(node_root), 'out')
def run_gyp(args):
rc = gyp.main(args)
if rc != 0:
- print 'Error running GYP'
+ print('Error running GYP')
sys.exit(rc)
if __name__ == '__main__':
@@ -56,5 +56,5 @@ if __name__ == '__main__':
args.append('-Dcomponent=static_library')
args.append('-Dlibrary=static_library')
gyp_args = list(args)
- print gyp_args
+ print(gyp_args)
run_gyp(gyp_args)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment