|
1 | 1 | repo-root := invocation_directory() |
2 | 2 | wit-world := if os() == "windows" { "$env:WIT_WORLD=\"" + repo-root + "/src/wasm_sandbox/wit/sandbox-world.wasm\";" } else { "WIT_WORLD=" + repo-root + "/src/wasm_sandbox/wit/sandbox-world.wasm" } |
3 | 3 |
|
4 | | -core-dist := repo-root + "/src/sdk/python/core/dist" |
5 | | -wasm-wheels := repo-root + "/src/sdk/python/wasm_backend/target/wheels" |
6 | | -hyperlight-js-wheels := repo-root + "/src/sdk/python/hyperlight_js_backend/target/wheels" |
7 | | -python-guest-dist := repo-root + "/src/sdk/python/wasm_guests/python_guest/dist" |
8 | | -javascript-guest-dist := repo-root + "/src/sdk/python/wasm_guests/javascript_guest/dist" |
| 4 | +dist-root := repo-root + "/dist/pythonsdk" |
| 5 | +core-dist := dist-root + "/core" |
| 6 | +wasm-wheels := dist-root + "/wasm_backend" |
| 7 | +hyperlight-js-wheels := dist-root + "/hyperlight_js_backend" |
| 8 | +python-guest-dist := dist-root + "/python_guest" |
| 9 | +javascript-guest-dist := dist-root + "/javascript_guest" |
9 | 10 |
|
10 | 11 | #### BUILD #### |
11 | 12 |
|
@@ -50,12 +51,12 @@ build: python-build |
50 | 51 | #### DIST / PUBLISH #### |
51 | 52 |
|
52 | 53 | python-dist: python-sync-guest-resources |
53 | | - rm -rf {{core-dist}} {{wasm-wheels}} {{hyperlight-js-wheels}} {{python-guest-dist}} {{javascript-guest-dist}} |
54 | | - cd {{repo-root}}/src/sdk/python/core && uv run python -m build |
55 | | - cd {{repo-root}}/src/sdk/python/wasm_backend && {{ wit-world }} uv run maturin build --release |
56 | | - cd {{repo-root}}/src/sdk/python/hyperlight_js_backend && uv run maturin build --release |
57 | | - cd {{repo-root}}/src/sdk/python/wasm_guests/python_guest && uv run python -m build |
58 | | - cd {{repo-root}}/src/sdk/python/wasm_guests/javascript_guest && uv run python -m build |
| 54 | + rm -rf {{dist-root}} |
| 55 | + cd {{repo-root}}/src/sdk/python/core && uv run python -m build --outdir {{core-dist}} |
| 56 | + cd {{repo-root}}/src/sdk/python/wasm_backend && {{ wit-world }} uv run maturin build --release --out {{wasm-wheels}} |
| 57 | + cd {{repo-root}}/src/sdk/python/hyperlight_js_backend && uv run maturin build --release --out {{hyperlight-js-wheels}} |
| 58 | + cd {{repo-root}}/src/sdk/python/wasm_guests/python_guest && uv run python -m build --outdir {{python-guest-dist}} |
| 59 | + cd {{repo-root}}/src/sdk/python/wasm_guests/javascript_guest && uv run python -m build --outdir {{javascript-guest-dist}} |
59 | 60 |
|
60 | 61 | python-publish repository="pypi": python-dist |
61 | 62 | #!/usr/bin/env bash |
|
0 commit comments