Skip to content

Commit

Permalink
Merge branch 'release' into release-5.4
Browse files Browse the repository at this point in the history
  • Loading branch information
thewtex committed Nov 5, 2024
2 parents dc9ab03 + 73841d0 commit 9b26a7b
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 2 deletions.
18 changes: 18 additions & 0 deletions Documentation/docs/contributing/build_test_itk.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,24 @@ cd src/ITK
pixi run test-python
```

To run a python interpreter with the locally built `itk` Python package:

```shell
pixi run python-exe
```

A Python script can also be passed in, e.g.

```shell
pixi run python-exe ./test.py
```

To run a python interpreter with a locally built `itk` Python package with debug symbols,

```shell
pixi run python-exe-debug
```

### Further testing and development

Additional pixi tasks to run specific steps of the `configure`, `build`, `test` development process or create builds with other [CMake build types] are listed with
Expand Down
16 changes: 14 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,12 @@ cmd = "ctest -j3 --test-dir build-python"
description = "Test ITK Python"
depends-on = ["build-python"]

[tool.pixi.feature.python.tasks.python-exe]
cmd = '''cp ./build-python/Wrapping/Generators/Python/WrapITK.pth $(python -c "import site; print(next(p for p in site.getsitepackages() if \'site-packages\' in p))") &&
python'''
description = "Run a Python executable with the development ITK Python package"
depends-on = ["build-python"]

[tool.pixi.feature.python.tasks.configure-debug-python]
cmd = '''cmake
-Bbuild-debug-python
Expand All @@ -117,19 +123,25 @@ cmd = '''cmake
-DCMAKE_BUILD_TYPE:STRING=Debug
-DBUILD_TESTING:BOOL=ON'''
description = "Configure ITK Python - Debug"
outputs = ["build-debug/CMakeFiles/"]
outputs = ["build-debug-python/CMakeFiles/"]

[tool.pixi.feature.python.tasks.build-debug-python]
cmd = "cmake --build build-debug-python"
description = "Build ITK Python - Debug"
outputs = ["build-debug/lib/**"]
outputs = ["build-debug-python/lib/**"]
depends-on = ["configure-debug-python"]

[tool.pixi.feature.python.tasks.test-debug-python]
cmd = "ctest -j3 --test-dir build-debug-python"
description = "Test ITK Python - Debug"
depends-on = ["build-debug-python"]

[tool.pixi.feature.python.tasks.python-exe-debug]
cmd = '''cp ./build-python/Wrapping/Generators/Python/WrapITK.pth $(python -c "import site; print(next(p for p in site.getsitepackages() if \'site-packages\' in p))") &&
python'''
description = "Run a Python executable with the development ITK Python Debug build package"
depends-on = ["build-debug-python"]

[tool.pixi.environments]
dev = ["dev"]
cxx = ["dev", "cxx"]
Expand Down

0 comments on commit 9b26a7b

Please sign in to comment.