libwally-core
libwally-core copied to clipboard
Invalid syntax while trying to build js-wrappers
On macOS 10.14.5 with Python 3.7.3 and Node v10.16.0. I think this fails because print "%s.%s.%s" % sys.version_info[:3];
is Python 2 syntax.
./configure --enable-debug --enable-export-all --enable-swig-python --enable-coverage --enable-js-wrappers
make
Fails with:
cd wrap_js && LIBWALLY_DIR=../.. npm_config_debug=1 yarn install
CCLD test_bech32
CCLD test_tx
yarn install v1.16.0
[1/4] π Resolving packages...
[2/4] π Fetching packages...
[3/4] π Linking dependencies...
[4/4] π¨ Building fresh packages...
$ node-gyp configure && node-gyp build
[##########################################################################################################################] 242/242gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp ERR! configure error
gyp ERR! stack Error: Command failed: /Users/sjors/.pyenv/shims/python -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack File "<string>", line 1
gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack ^
gyp ERR! stack SyntaxError: invalid syntax
I think node-gyp
package doesnβt work on Python 3, open issue: https://github.com/nodejs/node-gyp/issues/1337 .
You could install successfully node-gyp
using Python 2, and then build libwally with Python 3.