Skip to content

Commit d9a2a37

Browse files
author
zach
authored
fix: enable tests with python host (#116)
1 parent 55a56ca commit d9a2a37

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

Makefile

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -50,20 +50,19 @@ clean-wasi-sdk:
5050
test: compile-examples
5151
@extism call examples/simple_js.wasm greet --wasi --input="Benjamin"
5252
@extism call examples/bundled.wasm greet --wasi --input="Benjamin" --allow-host "example.com"
53-
# TODO uncomment block after python sdk is updated
54-
# ifeq ($(OS),Windows_NT)
55-
# @python3 -m venv ./.venv && \
56-
# ./.venv/Scripts/activate.bat && \
57-
# pip install -r examples/host_funcs/requirements.txt && \
58-
# python examples/host_funcs/host.py examples/host_funcs.wasm && \
59-
# ./.venv/Scripts/deactivate.bat
60-
# else
61-
# @python3 -m venv ./.venv && \
62-
# . ./.venv/bin/activate && \
63-
# pip install -r examples/host_funcs/requirements.txt && \
64-
# python3 examples/host_funcs/host.py examples/host_funcs.wasm && \
65-
# deactivate
66-
# endif
53+
ifeq ($(OS),Windows_NT)
54+
@python3 -m venv ./.venv && \
55+
./.venv/Scripts/activate.bat && \
56+
pip install -r examples/host_funcs/requirements.txt && \
57+
python examples/host_funcs/host.py examples/host_funcs.wasm && \
58+
./.venv/Scripts/deactivate.bat
59+
else
60+
@python3 -m venv ./.venv && \
61+
. ./.venv/bin/activate && \
62+
pip install -r examples/host_funcs/requirements.txt && \
63+
python3 examples/host_funcs/host.py examples/host_funcs.wasm && \
64+
deactivate
65+
endif
6766
@extism call examples/react.wasm render --wasi
6867
@extism call examples/react.wasm setState --input='{"action": "SET_SETTING", "payload": { "backgroundColor": "tomato" }}' --wasi
6968
@error_msg=$$(extism call examples/exception.wasm greet --wasi --input="Benjamin" 2>&1); \

0 commit comments

Comments
 (0)