Skip to content

Commit 26207b6

Browse files
jcfrthewtex
authored andcommitted
windows_build_wheels: Explicitly pass make program
1 parent 99d42c8 commit 26207b6

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

scripts/windows_build_wheels.py

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,9 @@ def prepare_build_env(python_version):
4747

4848

4949
def build_wrapped_itk(
50-
build_type, source_path, build_path,
50+
ninja_executable, build_type, source_path, build_path,
5151
python_executable, python_include_dir, python_library):
5252

53-
ninja_executable = os.path.join(
54-
ROOT_DIR, "venv-27-x64", "Scripts", "ninja.exe")
55-
print("NINJA_EXECUTABLE:%s" % ninja_executable)
56-
5753
try:
5854
# Because of python issue #14243, we set "delete=False" and
5955
# delete manually after process execution.
@@ -126,6 +122,10 @@ def build_wheel(python_version, single_wheel=False,
126122

127123
pip = os.path.join(venv_dir, "Scripts", "pip.exe")
128124

125+
ninja_executable = os.path.join(
126+
ROOT_DIR, "venv-27-x64", "Scripts", "ninja.exe")
127+
print("NINJA_EXECUTABLE:%s" % ninja_executable)
128+
129129
# Update PATH
130130
path = os.path.join(venv_dir, "Scripts")
131131
with push_env(PATH="%s%s%s" % (path, os.pathsep, os.environ["PATH"])):
@@ -152,10 +152,6 @@ def build_wheel(python_version, single_wheel=False,
152152
# Configure setup.py
153153
check_call([python_executable, setup_py_configure, "itk"])
154154

155-
ninja_executable = os.path.join(
156-
ROOT_DIR, "venv-27-x64", "Scripts", "ninja.exe")
157-
print("NINJA_EXECUTABLE:%s" % ninja_executable)
158-
159155
# Generate wheel
160156
check_call([
161157
python_executable,
@@ -179,7 +175,7 @@ def build_wheel(python_version, single_wheel=False,
179175
print("#")
180176

181177
build_wrapped_itk(
182-
build_type, source_path, build_path,
178+
ninja_executable, build_type, source_path, build_path,
183179
python_executable, python_include_dir, python_library)
184180

185181
# Build wheels
@@ -200,6 +196,7 @@ def build_wheel(python_version, single_wheel=False,
200196
"setup.py", "bdist_wheel",
201197
"--build-type", build_type, "-G", "Ninja",
202198
"--",
199+
"-DCMAKE_MAKE_PROGRAM:FILEPATH=%s" % ninja_executable,
203200
"-DITK_SOURCE_DIR:PATH=%s" % source_path,
204201
"-DITK_BINARY_DIR:PATH=%s" % build_path,
205202
"-DITKPythonPackage_ITK_BINARY_REUSE:BOOL=ON",

0 commit comments

Comments
 (0)