Skip to content

Commit a392427

Browse files
committed
build: fetch interface file for easier development, run uv sync on build so packages just need to be added to pyproject.toml
1 parent 0ffda5f commit a392427

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

template/prepare.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,7 @@ if ! command_exists extism-py; then
4040
sleep 2
4141
exit 1
4242
fi
43+
44+
# Download extism interface file for IDE intellisense
45+
# Ideally we'd have extism-py generate or output this to keep it in-sync
46+
curl -O https://raw.githubusercontent.com/extism/python-pdk/refs/heads/main/extism.pyi

template/xtp.toml.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ name = "<%= project.name %>"
88

99
[scripts]
1010
# xtp plugin build runs this script to generate the wasm file
11-
build = "PYTHONPATH=./plugin:./.venv/lib/python3.13/site-packages extism-py -o plugin.wasm plugin/__init__.py"
11+
build = "uv sync && PYTHONPATH=./plugin:./.venv/lib/python3.13/site-packages extism-py -o plugin.wasm plugin/__init__.py"
1212

1313
# xtp plugin init runs this script to format the code
1414
format = "uv run ruff format plugin/*.py"

0 commit comments

Comments
 (0)