Skip to content

Test packaging SimpleITK with Elastix#2544

Draft
blowekamp wants to merge 7 commits intoSimpleITK:mainfrom
blowekamp:package_simpleelastix
Draft

Test packaging SimpleITK with Elastix#2544
blowekamp wants to merge 7 commits intoSimpleITK:mainfrom
blowekamp:package_simpleelastix

Conversation

@blowekamp
Copy link
Copy Markdown
Member

No description provided.

Builds SimpleElastix Python 3.11 wheels (limited API) with
SimpleITK_USE_ELASTIX enabled. No source archives, no doxygen,
no publishing. Renames output wheels from SimpleITK to SimpleElastix.
Add a package-docker job building manylinux wheels for all four matrix
entries (x86_64 and aarch64, manylinux2014 and manylinux2-28) with
SimpleITK_USE_ELASTIX enabled and Python 3.11 limited API only.
Output wheels are renamed from SimpleITK to SimpleElastix.

Update cmd.sh to conditionally pass -DSimpleITK_USE_ELASTIX:BOOL=ON
to the SuperBuild cmake when the SIMPLEITK_USE_ELASTIX env var is set.
This is backwards-compatible; existing Package.yml builds are
unaffected.

Use CMake 4.2.0 in GHA
@blowekamp blowekamp force-pushed the package_simpleelastix branch 2 times, most recently from 3a288b0 to fbc0fc1 Compare March 27, 2026 19:10
@blowekamp
Copy link
Copy Markdown
Member Author

This appears to be working. If anyone tests an artifact then please report if it works for you or not.

Add a CMake cache variable SimpleITK_PYTHON_PACKAGE_NAME (default
"SimpleITK") to allow the Python package to be built under an
alternate name such as SimpleElastix.

- Use the variable for SWIG output directory, install destinations,
  and configured file paths in Wrapping/Python/CMakeLists.txt
- Use lowercase variant in pyproject.toml.in for the PyPI package name
- Switch Python source files to relative imports so they work
  regardless of the package directory name
- Install a SimpleITK compatibility shim into the test virtualenv
  when the package is renamed, so "import SimpleITK" still works
@blowekamp blowekamp force-pushed the package_simpleelastix branch from fbc0fc1 to 6aa6ae6 Compare April 8, 2026 16:00
Add a ctest_test_exclude input to the package_python composite action
that allows callers to specify a regex pattern for excluding tests from
ctest_test. When set, the CTEST_TEST_ARGS environment variable is
constructed with EXCLUDE;<pattern> which is passed through
github_actions.cmake to ctest_test() in simpleitk_common.cmake.

Use this in ElastixPackage.yml to exclude Python.Test(ArrayView|
ImageBuffer|Numpy) tests that fail because the package is named
SimpleElastix instead of SimpleITK.
When PYTHON_VERSIONS is empty the docker build script builds for all
supported Python versions rather than a single specified version.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant