Fix building wheels for windows (#365)

This commit is contained in:
Fangjun Kuang
2023-10-14 23:14:45 +08:00
committed by GitHub
parent 655e0fa836
commit 0df0a735d7
6 changed files with 10 additions and 6 deletions

View File

@@ -6,6 +6,7 @@ on:
- wheel
tags:
- '*'
workflow_dispatch:
env:
SHERPA_ONNX_IS_IN_GITHUB_ACTIONS: 1

View File

@@ -6,6 +6,7 @@ on:
- wheel
tags:
- '*'
workflow_dispatch:
env:
SHERPA_ONNX_IS_IN_GITHUB_ACTIONS: 1

View File

@@ -6,6 +6,7 @@ on:
- wheel
tags:
- '*'
workflow_dispatch:
env:
SHERPA_ONNX_IS_IN_GITHUB_ACTIONS: 1

View File

@@ -6,6 +6,7 @@ on:
- wheel
tags:
- '*'
workflow_dispatch:
env:
SHERPA_ONNX_IS_IN_GITHUB_ACTIONS: 1

View File

@@ -146,11 +146,11 @@ class BuildExtension(build_ext):
binaries += ["sherpa-onnx-portaudio.dll"]
binaries += ["onnxruntime.dll"]
binaries += ["kaldi-decoder-core.dll"]
binaries += ["sherpa-onnx-fst.dll"]
binaries += ["sherpa-onnx-kaldifst-core.dll"]
binaries += ["sherpa-onnx-fst.lib"]
binaries += ["sherpa-onnx-kaldifst-core.lib"]
for f in binaries:
suffix = "" if "dll" in f else suffix
suffix = "" if (".dll" in f or ".lib" in f) else suffix
src_file = install_dir / "bin" / (f + suffix)
if not src_file.is_file():
src_file = install_dir / "lib" / (f + suffix)

View File

@@ -65,12 +65,12 @@ def get_binaries_to_install():
binaries += ["sherpa-onnx-portaudio.dll"]
binaries += ["onnxruntime.dll"]
binaries += ["kaldi-decoder-core.dll"]
binaries += ["sherpa-onnx-fst.dll"]
binaries += ["sherpa-onnx-kaldifst-core.dll"]
binaries += ["sherpa-onnx-fst.lib"]
binaries += ["sherpa-onnx-kaldifst-core.lib"]
exe = []
for f in binaries:
suffix = "" if "dll" in f else suffix
suffix = "" if (".dll" in f or ".lib" in f) else suffix
t = bin_dir / (f + suffix)
exe.append(str(t))
return exe