ITK External Module GitHub builds for 4.X and 5.X

matt.mccormick
Sun, 06 May 2018 02:59:36 +0000
Engineering

As described in the ITKModuleTemplate README, it is possible to build and develop ITK modules on GitHub. The ITKModuleTemplate creates a configuration with continuous integration testing to build and test the module on Linux and build Python packages for Linux, macOS, and Windows.

The builds, by default, use the latest released version of ITK, including the ITK 5.0 alpha tags. With the transition to C++11, the Python packages are not expected to be compatible between ITK 4 and ITK 5.

It is possible to develop and test the module against both 4.13 and 5.X. Here are the steps:

Create a branch, e.g. release or ITKv4. Push this branch to GitHub and develop for 4.13 on this branch, while 5.X development can occur on master.

In the build-and-test section of .circleci/config.yml, build with the insighttoolkit/module-ci:v4.13 instead of the insighttoolkit/module-ci:latest image.

In the package section of .circleci/config.yml, set export ITK_PACKAGE_VERSION=v4.13.0 before calling dockcross-manylinux-download-cache-and-build-module-wheels.sh

In .travis.yml add - export ITK_PACKAGE_VERSION=v4.13.0 before calling macpython-download-cache-and-build-module-wheels.sh

In appveyor.yml, set the build command to $env:ITK_PACKAGE_VERSION='v4.13.0'; .\windows-download-cache-and-build-module-wheels.ps1

In setup.py set install_requires to itk<5

On the 5.X development branch, set the version= value in setup.py to a pre-release version, i.e. X.YaN, X.YbN, or X.YrcN where X.Y are higher numbers than the versions on the 4.X branch. This will ensure that a user can install the 4.X-based package with pip install itk-mymodule or the 5.X-based package with pip install --pre itk-mymodule.

This patch provides as an example.

5 posts - 2 participants