inveniosoftware / invenio-app-ils

Integrated Library System (ILS) flavour of Invenio.
https://invenioils.docs.cern.ch/
MIT License
71 stars 50 forks source link

Docker preview build fails with syntax error for gyp printing found python version #1175

Open thoni56 opened 1 year ago

thoni56 commented 1 year ago

Package version (if known): from repo - v1.0.0rc1 - 95feace0e37

Describe the bug

Running

docker-compose -f docker-compose.full.yml up

as per [instructions](docker-compose -f docker-compose.full.yml up) fails with the following error in the build log

#21 93.69 gyp verb check python checking for Python executable "python" in the PATH
#21 93.69 gyp verb `which` succeeded python /usr/local/bin/python
#21 93.70 gyp ERR! configure error 
#21 93.71 gyp ERR! stack Error: Command failed: /usr/local/bin/python -c import sys; print "%s.%s.%s" % sys.version_info[:3];
#21 93.71 gyp ERR! stack   File "<string>", line 1
#21 93.71 gyp ERR! stack     import sys; print "%s.%s.%s" % sys.version_info[:3];
#21 93.71 gyp ERR! stack                                ^
#21 93.71 gyp ERR! stack SyntaxError: invalid syntax
#21 93.71 gyp ERR! stack 
#21 93.71 gyp ERR! stack     at ChildProcess.exithandler (child_process.js:308:12)
#21 93.71 gyp ERR! stack     at ChildProcess.emit (events.js:314:20)
#21 93.71 gyp ERR! stack     at maybeClose (internal/child_process.js:1022:16)
#21 93.71 gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)

Environment

MacOS Ventura, with brew python.

Additional context

NOTE: I had to upgrade to python 3.7 in backend/Dockerfile since cryptography does not support 3.6.