Skip to content

Commit

Permalink
ENH: Pass setup.py and cmake options in PowerShell module script
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Rit committed Jan 4, 2023
1 parent cc3cbd2 commit 2dca3c8
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion scripts/windows-download-cache-and-build-module-wheels.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@
#
# > windows-download-cache-and-build-module-wheels.ps1 11
#
# - other parameters are passed to setup.py. If one of the parameters is "--",
# the following parameters will be passed to cmake.
# For instance, for Python 3.11, excluding nvcuda.dll during packaging
# and setting RTK_USE_CUDA ON during configuration:
#
# > windows-download-cache-and-build-module-wheels.ps1 11 --exclude-libs nvcuda.dll "--" -DRTK_USE_CUDA:BOOL=ON
#
#
# -----------------------------------------------------------------------
# Environment variables used in this script:
#
Expand Down Expand Up @@ -71,7 +79,14 @@ $env:Path += ";C:\P\grep"

# Build ITK module dependencies, if any
$build_command = "& `"C:\Python$pythonVersion-x$pythonArch\python.exe`" `"C:\P\IPP\scripts\windows_build_module_wheels.py`" --no-cleanup --py-envs `"3$($args[0])-x64`""
echo "Build command: $build_command"
foreach ($arg in $args[1..$args.length]) {
if ($arg.substring(0,2) -eq "--") {
$build_command = "$build_command $($arg)"
}
else {
$build_command = "$build_command `"$($arg)`""
}
}

echo "ITK_MODULE_PREQ: $env:ITK_MODULE_PREQ $ITK_MODULE_PREQ"
if ($env:ITK_MODULE_PREQ) {
Expand Down

0 comments on commit 2dca3c8

Please sign in to comment.