Skip to content

Commit dacc56a

Browse files
hjmjohnsonclaude
andcommitted
DOC: Add accelerated pixi-build workflow to build documentation
Document the libitk-wrapping conda package workflow for building remote module wheels without recompiling ITK from source. Includes instructions for building and installing the package, environment variable overrides for custom ITK branches, and cross-references between the ITK and module build docs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 3b767dd commit dacc56a

File tree

2 files changed

+53
-0
lines changed

2 files changed

+53
-0
lines changed

docs/Build_ITK_Module_Python_packages.rst

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,52 @@ For more control over build option, call ``build_wheels.py`` directly with
198198
--no-build-itk-tarball-cache
199199
200200
201+
.. _accelerated-builds:
202+
203+
Accelerated Builds with libitk-wrapping (pixi-build)
204+
=====================================================
205+
206+
When ITK is pre-installed in the conda/pixi environment via the
207+
``libitk-wrapping`` package, the build system automatically skips the
208+
expensive ITK C++ compilation (steps 01 and 02). This reduces remote
209+
module build times from ~1-2 hours to ~15 minutes.
210+
211+
To use this workflow, first build and install the ``libitk-wrapping``
212+
package:
213+
214+
.. code-block:: bash
215+
216+
cd packages/libitk-wrapping
217+
pixi build
218+
219+
Then build your module wheel — ITK will be detected automatically:
220+
221+
.. code-block:: bash
222+
223+
pixi run -e linux-py311 python scripts/build_wheels.py \
224+
--platform-env linux-py311 \
225+
--module-source-dir /path/to/ITKMyModule \
226+
--skip-itk-build \
227+
--skip-itk-wheel-build \
228+
--no-build-itk-tarball-cache
229+
230+
The detection checks ``CONDA_PREFIX`` and ``PIXI_ENVIRONMENT_DIR`` for
231+
``lib/cmake/ITK-*/ITKConfig.cmake``. When found, the console will print::
232+
233+
Detected conda-installed ITK at <path> (via $CONDA_PREFIX)
234+
Using conda-installed ITK; skipping superbuild and C++ build steps.
235+
236+
To override the ITK source repository and tag for the ``libitk-wrapping``
237+
build (e.g., to test a feature branch):
238+
239+
.. code-block:: bash
240+
241+
export ITK_GIT_URL="https://github.com/MyOrg/ITK.git"
242+
export ITK_GIT_TAG="my-feature-branch"
243+
cd packages/libitk-wrapping
244+
pixi build
245+
246+
201247
Module Dependencies
202248
===================
203249

docs/Build_ITK_Python_packages.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,13 @@ Finished wheels are placed in ``<build-dir-root>/dist/``.
132132
``--build-itk-tarball-cache`` to save the result as a reusable tarball
133133
and avoid rebuilding on subsequent runs.
134134

135+
.. tip::
136+
For even faster builds, install the ``libitk-wrapping`` conda package
137+
(see ``packages/libitk-wrapping/``). When present in the pixi/conda
138+
environment, the build system automatically detects it and skips the
139+
ITK C++ compilation entirely. See
140+
:ref:`Build ITK Module Python Packages <accelerated-builds>` for details.
141+
135142

136143
Key Options
137144
===========

0 commit comments

Comments
 (0)