-
Notifications
You must be signed in to change notification settings - Fork 23
/
pixi.toml
62 lines (50 loc) · 6.41 KB
/
pixi.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
[project]
name = "@itk-wasm/elastix"
version = "1.0.0"
authors = ["Matt McCormick <[email protected]>"]
channels = ["conda-forge"]
platforms = ["linux-64"]
repository = "https://github.com/InsightSoftwareConsortium/ITKElastix"
description = "A toolbox for rigid and nonrigid registration of images."
license = "Apache-2.0"
readme = "./README.md"
[activation]
scripts = ["itk_wasm_env.bash"]
[tasks]
clean = { cmd = "git clean -fdx", description = "Remove build artifacts" }
pnpm-install = { cmd = "pnpm install", description = "Install Node.js dependencies" }
test-data-download = { cmd = "npx dam download wasm/test/data wasm/test/data.tar.gz $ITK_WASM_TEST_DATA_HASH $ITK_WASM_TEST_DATA_URLS", description = "Download test data", depends-on = ["pnpm-install"] }
test-data-pack = { cmd = "npx dam pack wasm/test/data wasm/test/data.tar.gz", description = "Pack test data", depends-on = ["pnpm-install"] }
build-emscripten = { cmd = "npx itk-wasm build -i $ITK_WASM_EMSCRIPTEN_DOCKER_IMAGE", description = "Build Emscripten wasm modules", depends-on = ["pnpm-install"], inputs = ["wasm/CMakeLists.txt", "wasm/*.cxx"] }
build-emscripten-debug = { cmd = "npx itk-wasm build -i $ITK_WASM_EMSCRIPTEN_DOCKER_IMAGE-debug -- -DCMAKE_BUILD_TYPE:STRING=Debug", description = "Build Emscripten wasm modules", depends-on = ["pnpm-install"] }
build-wasi = { cmd = "npx itk-wasm build -i $ITK_WASM_WASI_DOCKER_IMAGE", description = "Build wasi wasm modules", depends-on = ["pnpm-install"] }
build-wasi-debug = { cmd = "npx itk-wasm build -i $ITK_WASM_WASI_DOCKER_IMAGE-debug -- -DCMAKE_BUILD_TYPE:STRING=Debug", description = "Build wasi wasm modules", depends-on = ["pnpm-install"] }
bindgen-typescript = { cmd = "npx itk-wasm -b emscripten-build bindgen --interface typescript --output-dir $ITK_WASM_TYPESCRIPT_OUTPUT_DIR --package-name $ITK_WASM_TYPESCRIPT_PACKAGE_NAME --package-description \"$ITK_WASM_DESCRIPTION\" --repository \"$ITK_WASM_REPOSITORY\"", description = "Generate typescript bindings", depends-on = [ "build-emscripten" ], inputs = ["emscripten-build/**.wasm"] }
bindgen-build-typescript = { cmd = "cd $ITK_WASM_TYPESCRIPT_OUTPUT_DIR && pnpm install && pnpm build", description = "Generate and build the typescript package", depends-on = ["build-emscripten", "bindgen-typescript", "version-sync-typescript"] }
bindgen-python = { cmd = "npx itk-wasm -b wasi-build bindgen --interface python --output-dir $ITK_WASM_PYTHON_OUTPUT_DIR --package-name $ITK_WASM_PYTHON_PACKAGE_NAME --package-description \"$ITK_WASM_DESCRIPTION\"", description = "Generate Python bindings", depends-on = ["build-wasi", "bindgen-build-typescript"], inputs = ["wasi-build/**.wasm"] }
bindgen-build-python = { description = "Generate and build the python packages", depends-on = ["build-wasi", "bindgen-python"] }
version-sync-typescript = { cmd = "jq --arg new_version $ITK_WASM_PACKAGE_VERSION '.version = $new_version' $ITK_WASM_TYPESCRIPT_OUTPUT_DIR/package.json > package.json.tmp && mv package.json.tmp $ITK_WASM_TYPESCRIPT_OUTPUT_DIR/package.json && echo \"const version = \\\"$ITK_WASM_PACKAGE_VERSION\\\"\nexport default version\n\" > $ITK_WASM_TYPESCRIPT_OUTPUT_DIR/src/version.ts", description = "Synchronize the version of the typescript package with the project version", depends-on = ["bindgen-build-typescript"] }
version-sync-python-wasi = { cmd = "cd $ITK_WASM_PYTHON_OUTPUT_DIR/$ITK_WASM_PYTHON_PACKAGE_NAME-wasi && hatch version $ITK_WASM_PACKAGE_VERSION", description = "Synchronize the version of the typescript package with the project version", depends-on = ["bindgen-build-python"] }
version-sync-python-emscripten = { cmd = "cd $ITK_WASM_PYTHON_OUTPUT_DIR/$ITK_WASM_PYTHON_PACKAGE_NAME-emscripten && hatch version $ITK_WASM_PACKAGE_VERSION", description = "Synchronize the version of the typescript package with the project version", depends-on = ["bindgen-build-python"] }
version-sync-python-dispatch = { cmd = "cd $ITK_WASM_PYTHON_OUTPUT_DIR/$ITK_WASM_PYTHON_PACKAGE_NAME && hatch version $ITK_WASM_PACKAGE_VERSION", description = "Synchronize the version of the typescript package with the project version", depends-on = ["bindgen-build-python"] }
version-sync-python = { depends-on = ["version-sync-python-wasi", "version-sync-python-emscripten", "version-sync-python-dispatch"] }
version-sync = { depends-on = ["version-sync-typescript", "version-sync-python"] }
build = { depends-on = ["bindgen-build-typescript", "bindgen-build-python"] }
publish-typescript = { cmd = "cd $ITK_WASM_TYPESCRIPT_OUTPUT_DIR && pnpm publish", description = "Publish the typescript package", depends-on = ["version-sync-typescript"] }
publish-python-wasi = { cmd = "cd $ITK_WASM_PYTHON_OUTPUT_DIR/$ITK_WASM_PYTHON_PACKAGE_NAME-wasi && hatch build && hatch publish", description = "Publish the Python WASI package", depends-on = [] }
publish-python-emscripten = { cmd = "cd $ITK_WASM_PYTHON_OUTPUT_DIR/$ITK_WASM_PYTHON_PACKAGE_NAME-emscripten && hatch build && hatch publish", description = "Publish the Python Emscripten package", depends-on = [] }
publish-python-dispatch = { cmd = "cd $ITK_WASM_PYTHON_OUTPUT_DIR/$ITK_WASM_PYTHON_PACKAGE_NAME && hatch build && hatch publish", description = "Publish the Python dispatch package", depends-on = [] }
publish-python = { depends-on = ["publish-python-wasi", "publish-python-emscripten", "publish-python-dispatch"] }
publish = { depends-on = ["publish-typescript", "publish-python"] }
test-typescript = { cmd = "cd $ITK_WASM_TYPESCRIPT_OUTPUT_DIR && pnpm test", description = "Test the typescript package", depends-on = ["test-data-download"] }
test-python-wasi = { cmd = "cd $ITK_WASM_PYTHON_OUTPUT_DIR/$ITK_WASM_PYTHON_PACKAGE_NAME-wasi && pixi run --manifest-path ./pyproject.toml test", description = "Test the Python WASI package", depends-on = ["test-data-download"] }
test-python-emscripten = { cmd = "cd $ITK_WASM_PYTHON_OUTPUT_DIR/$ITK_WASM_PYTHON_PACKAGE_NAME-emscripten && pixi run --manifest-path ./pyproject.toml test", description = "Test the Python Emscripten package", depends-on = ["test-data-download"] }
test-python-dispatch = { cmd = "cd $ITK_WASM_PYTHON_OUTPUT_DIR/$ITK_WASM_PYTHON_PACKAGE_NAME && hatch run test", description = "Test the Python dispatch package", depends-on = ["test-data-download"] }
test-python = { depends-on = ["test-python-wasi", "test-python-emscripten", "test-python-dispatch"] }
test = { depends-on = ["test-typescript", "test-python"] }
[dependencies]
nodejs = ">=22.5.1,<23"
pnpm = ">=9.6.0,<10"
jq = ">=1.7.1,<2"
python = ">=3.12.4,<4"
hatch = ">=1.12.0,<2"