ENH: Replace the shell wheel build system with Python (supersedes #302) - #309
hjmjohnson wants to merge 10 commits into
Conversation
d2ec481 to
00357a9
Compare
dzenanz
left a comment
There was a problem hiding this comment.
I have taken a look. There is too much code to look carefully. I tried running locally:
M:\a\IPP>pixi run python3 "C:\Misc\ITKPythonPackage\scripts\build_wheels.py" --platform-env windows-py311 --itk-source-dir C:/Dev/ITK-git
Error: × could not find pixi.toml or pyproject.toml with tool.pixi at directory M:\a\IPP
M:\a\IPP>cd C:\Misc\ITKPythonPackage
M:\a\IPP>c:
C:\Misc\ITKPythonPackage>pixi run python3 "C:\Misc\ITKPythonPackage\scripts\build_wheels.py" --platform-env windows-py311 --itk-source-dir C:/Dev/ITK-git
WARN Encountered 2 warnings while parsing the manifest:
⚠ the `[system-requirements]` table is deprecated in favor of virtual packages on `platforms`
╭─[C:\Misc\ITKPythonPackage\pixi.toml:82:1]
81 │
82 │ ╭─▶ [feature.manylinux228-build.system-requirements]
83 │ │ linux = "5.4"
84 │ ├─▶ libc = { family = "glibc", version = "2.28" }
· ╰──── declare these on the `platforms` entries instead
85 │
╰────
help: e.g. platforms = [{ platform = "linux-64", cuda = "12" }]
⚠ the `[system-requirements]` table is deprecated in favor of virtual packages on `platforms`
╭─[C:\Misc\ITKPythonPackage\pixi.toml:95:23]
94 │ platforms = ["osx-arm64"]
95 │ system-requirements = { macos = "14.0" }
· ─────────┬────────
· ╰── declare these on the `platforms` entries instead
96 │
╰────
help: e.g. platforms = [{ platform = "linux-64", cuda = "12" }]
Error launching 'python3': The system cannot find the path specified. (os error 3)
C:\Misc\ITKPythonPackage>pixi run python "C:\Misc\ITKPythonPackage\scripts\build_wheels.py" --platform-env windows-py311 --itk-source-dir C:/Dev/ITK-git
WARN Encountered 2 warnings while parsing the manifest:
⚠ the `[system-requirements]` table is deprecated in favor of virtual packages on `platforms`
╭─[C:\Misc\ITKPythonPackage\pixi.toml:82:1]
81 │
82 │ ╭─▶ [feature.manylinux228-build.system-requirements]
83 │ │ linux = "5.4"
84 │ ├─▶ libc = { family = "glibc", version = "2.28" }
· ╰──── declare these on the `platforms` entries instead
85 │
╰────
help: e.g. platforms = [{ platform = "linux-64", cuda = "12" }]
⚠ the `[system-requirements]` table is deprecated in favor of virtual packages on `platforms`
╭─[C:\Misc\ITKPythonPackage\pixi.toml:95:23]
94 │ platforms = ["osx-arm64"]
95 │ system-requirements = { macos = "14.0" }
· ─────────┬────────
· ╰── declare these on the `platforms` entries instead
96 │
╰────
help: e.g. platforms = [{ platform = "linux-64", cuda = "12" }]
Running >>>>>: git fetch --tags origin ; # in cwd=C:\Dev\ITK-git with check=False
Traceback (most recent call last):
File "C:\Misc\ITKPythonPackage\scripts\build_wheels.py", line 628, in <module>
build_wheels_main()
~~~~~~~~~~~~~~~~~^^
File "C:\Misc\ITKPythonPackage\scripts\build_wheels.py", line 450, in build_wheels_main
raise RuntimeError(
...<2 lines>...
)
RuntimeError: Failed to fetch ITK tags in C:\Dev\ITK-git: fatal: 'origin' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
C:\Misc\ITKPythonPackage>
| Environment names like ``['39-x64', '310-x64', '311-x64']``. | ||
| """ | ||
| default_platform_envs = [ | ||
| f"310-{platform_architecture}", |
There was a problem hiding this comment.
And 3.10 is retained for ability to build ITK 5.4 wheels?
|
This seems to be doing something: |
|
That failed too: run.log |
52be117 to
eb4482c
Compare
Co-Authored-By: Cavan Riley <cavan-riley@uiowa.edu>
Co-Authored-By: Cavan Riley <cavan-riley@uiowa.edu>
Co-Authored-By: Cavan Riley <cavan-riley@uiowa.edu>
68c1cca to
ef0c2d4
Compare
Co-Authored-By: Cavan Riley <cavan-riley@uiowa.edu>
Co-Authored-By: Cavan Riley <cavan-riley@uiowa.edu>
Co-Authored-By: Cavan Riley <cavan-riley@uiowa.edu>
Co-Authored-By: Cavan Riley <cavan-riley@uiowa.edu>
ef0c2d4 to
1af2b15
Compare
Windows verification complete — handing back to Linux/macOSEverything Windows-specific on this branch is now verified by real builds, and one cross-platform defect found along the way is fixed. Head is What was verified on Windows 11 / VS 2022 (i7-9800X, 32 GB)
Defects fixed on this branch by the Windows workAll Windows-only unless noted; none were reachable from Linux/macOS testing.
Plus three test fixes so the suite runs on Windows ( For Linux/macOS
|
Replaces the shell and PowerShell wheel-build system with a pixi-driven
Python one, and moves ITK 6 to stable-ABI (
abi3) wheels onmanylinux_2_28, macOS arm64 14.0, and Windows x86_64. Supersedes #302.
Status: verified on all four platforms. Draft pending maintainer review.
One item needs a decision before merge: the rebuilt macOS cache is
verified but not yet published to ITKPythonBuilds. The two Linux caches
and the Windows cache are published.
Platform verification — clean builds from this branch
Every row is a from-scratch build of this branch, not an incremental one.
cp311-abi3-manylinux_2_28_x86_64cp311-abi3-manylinux_2_28_aarch64cp311-abi3-macosx_14_0_arm64cp311-abi3-win_amd64macOS binaries were checked with
otool -l: real.sofiles reportminos 14.0, matching theirmacosx_14_0_arm64tag. That check mattersbecause a component wheel tagged below its true
minosinstalls on oldermacOS and then fails in dyld at import — installable and broken, rather
than loudly uninstallable.
Remote-module end-to-end (the consumer path)
Proven on Windows x86_64 and Linux x86_64, each run as a fresh
consumer with zero ITK wheels present beforehand, so a leftover
artifact could not produce a false pass.
Linux x86_64, ITKBioCell, 8 minutes,
rc=0:itk_biocell-1.0.0-cp311-abi3-manylinux_2_28_x86_64.whl, 0.58 MBRequires-Dist: itk<7,>=6.0.0b1— the dependency rewrite firedauditwheelpyproject.tomlrestored byte-identical after the buildAn earlier Windows pass was found to be riding on leftover wheels; the
zero-wheel precondition was added in response and both platforms were
re-run under it.
Unit tests and hooks
pytest: 97 passed. pytest is a developer-only dependency; thenormal build path does not import it.
pre-commit run --all-files: exit 0, every hookPassed(black, ruff, shellcheck, shfmt, taplo, yaml/toml, whitespace).
Known caveat: intermittent aarch64 link truncation
One clean aarch64 build failed while linking:
The identical clean build then passed, with no truncation and no short
object files. Evidence points at the container file-sharing layer rather
than this branch: 158 GB free at the time, the truncated archive was
exactly 49,152 bytes (12 × 4096, a dropped write tail rather than a
partial compile), and aarch64 is the only platform writing through a
Docker bind mount onto a macOS filesystem.
Docker Desktop updated itself between the two runs (29.7.2 → 29.8.0), so
the version cannot be credited with the fix, and one pass does not
disprove an intermittent fault. Recommended handling: retry a clean
build first; do not treat a truncation as a defect in this branch.
Commit series
Ten topical commits, no fixups and no merge commits. Bug fixes found
during platform testing were folded into the commits that introduced the
code, so the series reads as though the defects never existed.
Cavan Riley is credited via
Co-Authored-Byon the seven commitscarrying his original work.