You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Update Windows script argument parsing to match Linux and macOS #250
Linux and macOS module build scripts accept "-c" and "-x" command line options along with positional arguments for Python versions and assorted environment variables documented in script headers. See manylinux-build-module-wheels.sh) for parsing.
Meanwhile Windows scripts use a different convention with distinct long arguments and trailing CMake parameters to accomplish the same functionality. See windows_build_module_wheels.py.
The following changes are requested:
Update Windows script argument handling to match conventions laid out in Linux and macOS scripts
If necessary, introduce arguments from Windows script parsing back to Linux and macOS scripts
Recommend closing: the script this issue cites (windows_build_module_wheels.py) is gone, and all three module entry points now forward to the same scripts/build_wheels.py with the same cmake_options name. The remaining work, retiring the three scripts in favor of calling build_wheels.py directly, is tracked in #310.
PowerShell binds -c to -cmake_options by unique prefix, so -c
works on all three.
The Linux -x / --exclude_libs that Windows lacked is now accepted
and ignored on Linux. Windows reaches the same build_wheels.py
options (--exclude-libs, --lib-paths) through -setup_options.
The only differences left are how the Python version is spelled and
that Windows takes one version per call. ITKRemoteModuleBuildTestPackageAction
runs one version per job on every platform, so neither matters to it.
Activity
SimonRit commentedon Feb 21, 2023
While working on InsightSoftwareConsortium/ITKRemoteModuleBuildTestPackageAction#58, I had a quick look at at how to use parameters in powershell but that does not seem so straightforward to convert PowerShell parameters to Python argparse parameters. Maybe bash should be used instead of Powershell for
windows-download-cache-and-build-module-wheels.ps1?tbirdso commentedon Feb 21, 2023
@SimonRit To my knowledge the two reasons that we use PowerShell for Windows build scripts are:
Launch-VSDevShell.ps1(see https://github.com/InsightSoftwareConsortium/ITKRemoteModuleBuildTestPackageAction/blob/main/.github/workflows/build-test-package-python.yml#L233)scikit-ci-addonsPowerShell script to fetch Python versions (see https://github.com/InsightSoftwareConsortium/ITKPythonPackage/blob/master/scripts/windows-download-cache-and-build-module-wheels.ps1#L44)I agree that it would be interesting to investigate the difficulty involved with porting the Windows build procedure to bash.
hjmjohnson commentedon Nov 25, 2026
Recommend closing: the script this issue cites (
windows_build_module_wheels.py) is gone, and all three module entry points now forward to the samescripts/build_wheels.pywith the samecmake_optionsname. The remaining work, retiring the three scripts in favor of callingbuild_wheels.pydirectly, is tracked in #310.Arguments today (main, d1e7d0d)
cp311, many-c,--cmake_options3.11, many-c,--cmake_options11, one-cmake_options-cto-cmake_optionsby unique prefix, so-cworks on all three.
-x/--exclude_libsthat Windows lacked is now acceptedand ignored on Linux. Windows reaches the same
build_wheels.pyoptions (
--exclude-libs,--lib-paths) through-setup_options.that Windows takes one version per call. ITKRemoteModuleBuildTestPackageAction
runs one version per job on every platform, so neither matters to it.