Skip to content

Commit 03cc291

Browse files
hjmjohnsonclaude
andcommitted
BUG: Pin ITK dep floor to MAJOR.MINOR of the version being built
A wheel compiled against ITK 6.0 must require >= 6.0 at install time, not >= 5.4. The floor reflects the ITK series the wheel was linked against. The build system supports building against any ITK from v5.4 through the latest — the floor is derived dynamically from ITK_PACKAGE_VERSION at build time. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 35eaeb3 commit 03cc291

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

scripts/build_python_instance_base.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -836,11 +836,17 @@ def _update_module_itk_deps(pyproject_path: Path, itk_version: str) -> bool:
836836
f"cross-dep {m.group(0)} — review manually"
837837
)
838838

839-
# Remote modules must support installation across the full
840-
# ITK 5.4 → latest range. Use a fixed floor of 5.4 so that a
841-
# wheel built against any ITK version (5.4.x, 6.0.x, etc.) is
842-
# installable with any ITK >= 5.4.
843-
min_floor = "5.4"
839+
# The minimum version floor is the MAJOR.MINOR of the ITK version
840+
# being built. A wheel compiled against ITK 6.0 requires ITK >= 6.0
841+
# at install time; one compiled against ITK 5.4 requires >= 5.4.
842+
# The build system itself supports building against any ITK from
843+
# v5.4 through the latest (v5.5, v6.0, v7.1, etc.) — the floor
844+
# simply reflects which ITK the wheel was actually linked against.
845+
parts = itk_version.split(".")
846+
try:
847+
min_floor = f"{parts[0]}.{parts[1]}"
848+
except IndexError:
849+
min_floor = itk_version
844850

845851
changed = False
846852
def _replace(m: re.Match) -> str:

0 commit comments

Comments
 (0)