diff --git a/template/prepare.sh b/template/prepare.sh index 8411ac7..8f3988c 100644 --- a/template/prepare.sh +++ b/template/prepare.sh @@ -40,3 +40,7 @@ if ! command_exists extism-py; then sleep 2 exit 1 fi + +# Download extism interface file for IDE intellisense +# Ideally we'd have extism-py generate or output this to keep it in-sync +curl -O https://raw.githubusercontent.com/extism/python-pdk/refs/heads/main/extism.pyi diff --git a/template/xtp.toml.ejs b/template/xtp.toml.ejs index 5b6ed23..1da38a8 100644 --- a/template/xtp.toml.ejs +++ b/template/xtp.toml.ejs @@ -8,7 +8,7 @@ name = "<%= project.name %>" [scripts] # xtp plugin build runs this script to generate the wasm file -build = "PYTHONPATH=./plugin:./.venv/lib/python3.13/site-packages extism-py -o plugin.wasm plugin/__init__.py" +build = "uv sync && PYTHONPATH=./plugin:./.venv/lib/python3.13/site-packages extism-py -o plugin.wasm plugin/__init__.py" # xtp plugin init runs this script to format the code format = "uv run ruff format plugin/*.py"