From 69ca1f178cb88472afe32f225e864c7d7fb70c14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Hatcher?= Date: Sun, 19 Jan 2025 18:11:52 +0100 Subject: [PATCH] FIX: Uses python3 if python is not available --- bindings/wasm/Makefile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/bindings/wasm/Makefile b/bindings/wasm/Makefile index 9b9a0b8..6f32e69 100644 --- a/bindings/wasm/Makefile +++ b/bindings/wasm/Makefile @@ -1,8 +1,16 @@ +# In some platforms, python is called python3 +PYTHON := $(shell command -v python 2>/dev/null || command -v python3 2>/dev/null) + +# If neither is found, fail immediately +ifeq ($(PYTHON),) + $(error No python found. Please install python.) +endif + all: wasm-pack build --target web --scope ironcalc --release cp README.pkg.md pkg/README.md tsc types.ts --target esnext --module esnext - python fix_types.py + $(PYTHON) fix_types.py rm -f types.js tests: