Fix building wheels for windows (#365)
This commit is contained in:
1
.github/workflows/build-wheels-aarch64.yaml
vendored
1
.github/workflows/build-wheels-aarch64.yaml
vendored
@@ -6,6 +6,7 @@ on:
|
||||
- wheel
|
||||
tags:
|
||||
- '*'
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
SHERPA_ONNX_IS_IN_GITHUB_ACTIONS: 1
|
||||
|
||||
1
.github/workflows/build-wheels-macos.yaml
vendored
1
.github/workflows/build-wheels-macos.yaml
vendored
@@ -6,6 +6,7 @@ on:
|
||||
- wheel
|
||||
tags:
|
||||
- '*'
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
SHERPA_ONNX_IS_IN_GITHUB_ACTIONS: 1
|
||||
|
||||
1
.github/workflows/build-wheels-win32.yaml
vendored
1
.github/workflows/build-wheels-win32.yaml
vendored
@@ -6,6 +6,7 @@ on:
|
||||
- wheel
|
||||
tags:
|
||||
- '*'
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
SHERPA_ONNX_IS_IN_GITHUB_ACTIONS: 1
|
||||
|
||||
1
.github/workflows/build-wheels.yaml
vendored
1
.github/workflows/build-wheels.yaml
vendored
@@ -6,6 +6,7 @@ on:
|
||||
- wheel
|
||||
tags:
|
||||
- '*'
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
SHERPA_ONNX_IS_IN_GITHUB_ACTIONS: 1
|
||||
|
||||
@@ -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)
|
||||
|
||||
6
setup.py
6
setup.py
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user