Skip to content
Closed
Changes from 1 commit
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
0b141ad
ENH: Add GitHub issue templates for bug reports and feature requests
hjmjohnson Sep 15, 2026
fd9ff20
ENH: Transition build system from shell scripts to consolidated Pytho…
CavRiley Mar 17, 2026
1585809
ENH: Add platform-specific Python build scripts for Linux, macOS, and…
CavRiley Mar 17, 2026
d6ad972
ENH: Add tarball creation and ITK build cache management
CavRiley Mar 17, 2026
ec93145
ENH: Remove legacy shell scripts, add pre-commit hooks, drop Python 3.9
CavRiley Mar 17, 2026
a2140a6
DOC: Update online docs and infrastructure for docs generation
CavRiley Mar 18, 2026
5119cce
ENH: Add GitHub Action to generate documentation artifacts
CavRiley Mar 18, 2026
08d720e
DOC: Add CONTRIBUTING.md file
CavRiley Mar 28, 2026
ece190d
ENH: Add scripts to publish wheels and cached builds
CavRiley Mar 29, 2026
63f2a5f
ENH: Configure commitizen for ITK commit message convention
hjmjohnson Apr 3, 2026
226e3f1
ENH: Dynamically update ITK dependency pins in remote module builds
hjmjohnson Apr 3, 2026
ea82e82
ENH: Preserve module pyproject.toml when rewriting ITK deps
hjmjohnson Apr 3, 2026
2bcec69
DOC: Add Strategy 3 migration plan to _update_module_itk_deps
hjmjohnson Apr 3, 2026
251074c
ENH: Branch between Strategy 3 and Strategy 1 for ITK dep resolution
hjmjohnson Apr 3, 2026
13d819a
ENH: Restrict Strategy 1 dep rewrite to ITK base sub-packages only
hjmjohnson Apr 3, 2026
8161c7c
BUG: Pin ITK dep floor to vMAJOR.MINOR of the ITK version being built
hjmjohnson Apr 3, 2026
eb0eb38
BUG: Use fixed >= 5.4 floor for ITK deps across all versions
hjmjohnson Apr 3, 2026
d91c41b
BUG: Pin ITK dep floor to MAJOR.MINOR of the version being built
hjmjohnson Apr 3, 2026
6514564
ENH: Add scripts to build all ITK + remote module wheels from latest …
hjmjohnson Apr 3, 2026
9610278
ENH: Allow specifying ITK branch, tag, or hash for build-all scripts
hjmjohnson Apr 3, 2026
a5c5234
STYLE: Move build-all-latest-wheels scripts to Utilities/scripts
hjmjohnson Apr 3, 2026
48eac36
STYLE: Move publish scripts to Utilities/scripts
CavRiley Jun 18, 2026
d1b872b
STYLE: Apply pre-commit hook fixes across the repository
CavRiley Jun 25, 2026
571bf5a
BUG: Delocate all macOS arm64 wheels and tag them for the deployment …
hjmjohnson Sep 15, 2026
f48a45b
PERF: Restore Pool as the default ITK threader in the Python build
hjmjohnson Sep 15, 2026
17c27a5
BUG: Refuse to upload linux_* wheels to PyPI
hjmjohnson Sep 15, 2026
b4d6553
DOC: Link the ITK Python quick start guide from the docs landing page
hjmjohnson Sep 15, 2026
e5d5256
BUG: Fail the build step when a wheel build or delocate fails
hjmjohnson Sep 15, 2026
bb13219
COMP: Build only Python 3.11+ and Apple Silicon wheels for ITK 6
hjmjohnson Sep 15, 2026
4e711ae
BUG: Skip delocate for macOS wheels without compiled binaries
hjmjohnson Sep 16, 2026
13760fc
BUG: Mount /work from the host for aarch64 container builds
hjmjohnson Sep 16, 2026
a14ac7f
Revert "BUG: Mount /work from the host for aarch64 container builds"
hjmjohnson Sep 16, 2026
9099c9c
BUG: Write the ITK build cache inside the mounted build tree
hjmjohnson Sep 16, 2026
be34856
ENH: Remove the uncompressed archive after building the build cache
hjmjohnson Sep 16, 2026
0fb9892
BUG: Use raw strings for the Windows archive exclude patterns
hjmjohnson Sep 16, 2026
3b5ef2f
BUG: Rewrite the itk metapackage pin for remote module wheels
hjmjohnson Sep 16, 2026
613223d
BUG: Derive the ITK dependency floor from the numeric version only
hjmjohnson Sep 16, 2026
562dace
BUG: Bound the ITK dependency pin and repair the cleanup globs
hjmjohnson Sep 16, 2026
c1526bb
DOC: Point the cache scripts at the branch that carries them
hjmjohnson Sep 16, 2026
eb381e3
STYLE: Clear the review findings that were plainly correct
hjmjohnson Sep 16, 2026
96ca5c8
STYLE: Drop the shell copy of the build-all-wheels driver
hjmjohnson Sep 16, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
ENH: Preserve module pyproject.toml when rewriting ITK deps
Back up pyproject.toml to pyproject.toml.orig before rewriting ITK
dependency pins, then restore the original after the wheel is built.
The modified version is saved as pyproject.toml.whl for reference.
Uses try/finally to guarantee restore even if the build fails.
  • Loading branch information
hjmjohnson committed Sep 16, 2026
commit ea82e8246a8a6df5367bdbe3cebc14acc28ce0c3
30 changes: 24 additions & 6 deletions scripts/build_python_instance_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -713,12 +713,20 @@ def build_external_module_python_wheel(self):
out_dir = self.module_source_dir / "dist"
out_dir.mkdir(parents=True, exist_ok=True)

# Dynamically update ITK dependency pins to match the version being built
# Dynamically update ITK dependency pins to match the version being built.
# Back up the original pyproject.toml so the working tree is restored
# after the wheel is produced.
module_pyproject = self.module_source_dir / "pyproject.toml"
pyproject_orig = module_pyproject.with_suffix(".toml.orig")
pyproject_whl = module_pyproject.with_suffix(".toml.whl")
deps_rewritten = False
if module_pyproject.is_file():
itk_ver = self.package_env_config.get("ITK_PACKAGE_VERSION", "")
if itk_ver:
self._update_module_itk_deps(module_pyproject, itk_ver)
shutil.copy2(module_pyproject, pyproject_orig)
deps_rewritten = self._update_module_itk_deps(
module_pyproject, itk_ver
)

# Ensure venv tools are first in PATH
py_exe = str(self.package_env_config["PYTHON_EXECUTABLE"]) # Python3_EXECUTABLE
Expand Down Expand Up @@ -816,11 +824,21 @@ def build_external_module_python_wheel(self):
# Module source directory to build
cmd += [self.module_source_dir]

self.echo_check_call(cmd)
try:
self.echo_check_call(cmd)

# Post-process produced wheels (e.g., delocate on macOS x86_64)
for wheel in out_dir.glob("*.whl"):
self.fixup_wheel(str(wheel), remote_module_wheel=True)
# Post-process produced wheels (e.g., delocate on macOS x86_64)
for wheel in out_dir.glob("*.whl"):
self.fixup_wheel(str(wheel), remote_module_wheel=True)
finally:
# Restore original pyproject.toml so the working tree stays clean
if deps_rewritten and pyproject_orig.is_file():
shutil.copy2(module_pyproject, pyproject_whl)
shutil.move(str(pyproject_orig), str(module_pyproject))
print(
f"Restored {module_pyproject} "
f"(modified version saved as {pyproject_whl.name})"
)

def build_itk_python_wheels(self):
"""Build all ITK Python wheels listed in ``WHEEL_NAMES.txt``."""
Expand Down