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/multi platform wheels #5

Merged
merged 7 commits into from
Dec 8, 2024
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
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