diff --git a/binding.gyp b/binding.gyp index 050cd4b..b112581 100644 --- a/binding.gyp +++ b/binding.gyp @@ -2,11 +2,20 @@ # This replaces the complex manual configuration with CMake-based builds { "variables": { - "use_global_liblzma%": " 0) ? process.env.RUNTIME_LINK : (process.platform === 'linux' || process.platform === 'darwin' ? 'shared' : 'static')\")", - "enable_thread_support%": "=10 (shipped with node >=20) + # writes the absolute python path into build/config.gypi, so <(python) + # always resolves before binding.gyp parses. Quoting around <(python) + # and <(module_root_dir) preserves paths containing spaces (e.g. + # C:\Program Files\Python311\python.exe — the literal value reported + # in the issue logs). + "py3%": "<(python)", + "use_global_liblzma%": "") + name = sys.argv[1] + handler = COMMANDS.get(name) + if handler is None: + sys.exit(f"unknown variable: {name}") + sys.stdout.write(handler()) + + +if __name__ == "__main__": + main()