Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
Fedir Zadniprovskyi committed Jan 11, 2025
1 parent e503533 commit ada133d
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 5 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/build-wheels.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Build Wheels
on: [push, pull_request, workflow_dispatch]
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
# macos-13 is an intel runner, macos-14 is apple silicon
os: [ubuntu-latest, windows-latest, macos-13, macos-14]
steps:
- uses: actions/checkout@v4
- name: Build wheels
uses: pypa/[email protected]
# env:
# CIBW_SOME_OPTION: value
# ...
# with:
# package-dir: .
# output-dir: wheelhouse
# config-file: "{package}/pyproject.toml"
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl
30 changes: 26 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,28 @@
[build-system]
requires = [
"setuptools>=42",
"pybind11>=2.10.0",
]
requires = ["setuptools>=42", "pybind11>=2.10.0"]
build-backend = "setuptools.build_meta"

[tool.cibuildwheel]
build = "cp312-*"
skip = "cp312-musllinux*"

archs = ["x86_64"]
build-frontend = "build[uv]"

before-all = "cmake -B build -D CMAKE_INSTALL_PREFIX=install && cmake --build build --config Release && cmake --install build"

container-engine = "docker"

manylinux-x86_64-image = "manylinux_2_28"
manylinux-aarch64-image = "manylinux_2_28"


[tool.cibuildwheel.linux]
repair-wheel-command = """
ORIG_PATH=$PATH && \
ORIG_LD_LIBRARY_PATH=$LD_LIBRARY_PATH && \
export LD_LIBRARY_PATH=$(pwd)/install/lib:$(pwd)/install/lib64:$(pwd)/lib/onnxruntime-linux-x64-1.14.1/lib:$LD_LIBRARY_PATH && \
auditwheel repair --plat manylinux_2_28_x86_64 --wheel-dir {dest_dir} {wheel} && \
export PATH=$ORIG_PATH && \
export LD_LIBRARY_PATH=$ORIG_LD_LIBRARY_PATH
"""
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
packages=["piper_phonemize"],
package_data={
"piper_phonemize": [
str(p) for p in (_DIR / "piper_phonemize" / "espeak-ng-data").rglob("*")
str(p) for p in (_DIR / "install" / "share" / "espeak-ng-data").rglob("*")
]
+ [str(_DIR / "libtashkeel_model.ort")]
},
Expand Down

0 comments on commit ada133d

Please sign in to comment.