Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Windows script argument parsing to match Linux and macOS #250

Open
tbirdso opened this issue Jan 11, 2023 · 2 comments
Open

Update Windows script argument parsing to match Linux and macOS #250

tbirdso opened this issue Jan 11, 2023 · 2 comments

Comments

@tbirdso
Copy link
Contributor

tbirdso commented Jan 11, 2023

Summary

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:

  1. Update Windows script argument handling to match conventions laid out in Linux and macOS scripts
  2. If necessary, introduce arguments from Windows script parsing back to Linux and macOS scripts

Other Notes

See original discussion: #248 (comment)

@SimonRit
Copy link

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
Copy link
Contributor Author

tbirdso commented Feb 21, 2023

@SimonRit To my knowledge the two reasons that we use PowerShell for Windows build scripts are:

  1. Easy development environment setup with Launch-VSDevShell.ps1 (see https://github.com/InsightSoftwareConsortium/ITKRemoteModuleBuildTestPackageAction/blob/main/.github/workflows/build-test-package-python.yml#L233)
  2. Calling the scikit-ci-addons PowerShell 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.

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

No branches or pull requests

2 participants