Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions template/prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah this is a bit weird. why not put it in the template directory? if it's needed i have no objection though.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer it this way as it avoids needing to keep the file up to date in another place. Eventually, maybe we pack the file into extism-py so it is matched directly with the python-pdk.

2 changes: 1 addition & 1 deletion template/xtp.toml.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading