Skip to content

Commit

Permalink
Fix/multi platform wheels (#5)
Browse files Browse the repository at this point in the history
* multi platform wheels
  • Loading branch information
thewh1teagle authored Dec 8, 2024
1 parent c4a8a83 commit eadc3fe
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,19 @@ jobs:
include:
- platform: "macos-latest" # for Arm-based Macs (M1 and above)
archive: "libaec-osx-aarch64.tar.gz"
wheel-tag: "py3-none-macosx_11_0_arm64"

- platform: "macos-latest" # for Intel-based Macs
archive: "libaec-osx-x86-64.tar.gz"
wheel-tag: "py3-none-macosx_10_12_x86_64"

- platform: "ubuntu-22.04" # Ubuntu 22.04 x86_64
archive: "libaec-linux-x86-64.tar.gz"
wheel-tag: "py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64"

- platform: "windows-latest" # Windows x86_64
archive: "libaec-win-x86-64.zip"
wheel-tag: "py3-none-win_amd64"

runs-on: ${{ matrix.platform }}

Expand Down Expand Up @@ -54,4 +58,5 @@ jobs:
working-directory: pyaec
env:
UV_PUBLISH_TOKEN: ${{ secrets.UV_PUBLISH_TOKEN }}
WHEEL_TAG: ${{ matrix.wheel-tag }}
shell: bash
12 changes: 11 additions & 1 deletion pyaec/hatch_build.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
from hatchling.builders.hooks.plugin.interface import BuildHookInterface
import os


class CustomBuildHook(BuildHookInterface):
def initialize(self, version, build_data):
build_data["pure_python"] = False
build_data["infer_tag"] = True
tag = os.getenv("WHEEL_TAG")
if tag:
# py3-none-linux_x86_64
# py3-none-win_amd64
# py3-none-macosx_11_0_arm64
# py3-none-macosx_10_12_x86_64
# PYTHON_TAG='py3-none-linux_x86_64' uv build
build_data["tag"] = tag
else:
build_data["infer_tag"] = True
2 changes: 1 addition & 1 deletion pyaec/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "pyaec"
version = "0.1.0-beta.1"
version = "0.1.0-beta.2"
description = "Acoustic echo cancellation"
readme = "README.md"
authors = [
Expand Down

0 comments on commit eadc3fe

Please sign in to comment.