From 9dd94fbbd1a9dcc23b5a4f9bd5865175ae2a7325 Mon Sep 17 00:00:00 2001 From: Marius Brehler Date: Wed, 22 Jan 2025 17:42:25 +0100 Subject: [PATCH] Attempt to fix the Python wheels for Windows (#3979) --- setup.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/setup.py b/setup.py index 4b5658277457..b04a15004e76 100644 --- a/setup.py +++ b/setup.py @@ -46,6 +46,7 @@ # that here, and just package up its contents. import os import pathlib +import platform import shutil import subprocess import sys @@ -202,6 +203,9 @@ def run(self): torch_mlir_opt_dst = os.path.join( target_dir, "torch_mlir", "_mlir_libs", "torch-mlir-opt" ) + if platform.system() == "Windows": + torch_mlir_opt_src += ".exe" + torch_mlir_opt_dst += ".exe" shutil.copy2(torch_mlir_opt_src, torch_mlir_opt_dst, follow_symlinks=False)