nodejs / node-gyp

Node.js native addon build tool
MIT License
9.95k stars 1.8k forks source link

Walrus operator only supported in Python 3.8 #3053

Closed leithouse closed 3 months ago

leithouse commented 3 months ago

In the most recent release, gyp/common.py includes the Walrus operator. This operator was introduced in python 3.8. Build environments that are still required to run on Debian Buster are stuck with python 3.7.3-1.

Relevant output ```sh gyp info it worked if it ends with ok gyp info using node-gyp@10.2.0 gyp info using node@20.16.0 | linux | x64 gyp info find Python using Python version 3.7.3 found at "/usr/bin/python3" ... Traceback (most recent call last): File "/usr/local/share/.config/yarn/global/node_modules/node-gyp/gyp/gyp_main.py", line 42, in import gyp # noqa: E402 File "/usr/local/share/.config/yarn/global/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 9, in import gyp.input File "/usr/local/share/.config/yarn/global/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 8, in import gyp.common File "/usr/local/share/.config/yarn/global/node_modules/node-gyp/gyp/pylib/gyp/common.py", line 435 if CC := os.environ.get("CC_target") or os.environ.get("CC"): ^ SyntaxError: invalid syntax ```
cclauss commented 3 months ago

https://devguide.python.org/versions/#supported-versions