libwally-core icon indicating copy to clipboard operation
libwally-core copied to clipboard

Invalid syntax while trying to build js-wrappers

Open Sjors opened this issue 5 years ago β€’ 1 comments

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

Sjors avatar Jun 04 '19 12:06 Sjors

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.

lvaccaro avatar Jun 10 '19 08:06 lvaccaro