Skip to content

Commit 9dd94fb

Browse files
authored
Attempt to fix the Python wheels for Windows (#3979)
1 parent 2fb7d6e commit 9dd94fb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

setup.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
# that here, and just package up its contents.
4747
import os
4848
import pathlib
49+
import platform
4950
import shutil
5051
import subprocess
5152
import sys
@@ -202,6 +203,9 @@ def run(self):
202203
torch_mlir_opt_dst = os.path.join(
203204
target_dir, "torch_mlir", "_mlir_libs", "torch-mlir-opt"
204205
)
206+
if platform.system() == "Windows":
207+
torch_mlir_opt_src += ".exe"
208+
torch_mlir_opt_dst += ".exe"
205209
shutil.copy2(torch_mlir_opt_src, torch_mlir_opt_dst, follow_symlinks=False)
206210

207211

0 commit comments

Comments
 (0)