Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix building wheels for windows #365

Merged
merged 4 commits into from
Oct 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/build-wheels-aarch64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
- wheel
tags:
- '*'
workflow_dispatch:

env:
SHERPA_ONNX_IS_IN_GITHUB_ACTIONS: 1
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-wheels-macos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
- wheel
tags:
- '*'
workflow_dispatch:

env:
SHERPA_ONNX_IS_IN_GITHUB_ACTIONS: 1
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-wheels-win32.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
- wheel
tags:
- '*'
workflow_dispatch:

env:
SHERPA_ONNX_IS_IN_GITHUB_ACTIONS: 1
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-wheels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
- wheel
tags:
- '*'
workflow_dispatch:

env:
SHERPA_ONNX_IS_IN_GITHUB_ACTIONS: 1
Expand Down
6 changes: 3 additions & 3 deletions cmake/cmake_extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,11 @@ def build_extension(self, ext: setuptools.extension.Extension):
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)
Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down