From 6a66705a9ad4373019e7c632640962b7d0a8d079 Mon Sep 17 00:00:00 2001 From: urasakikeisuke <79469739+urasakikeisuke@users.noreply.github.com> Date: Wed, 10 Dec 2025 21:08:27 +0900 Subject: [PATCH] build: use python-lzf on aarch64 to fix installation errors Updated dependencies to handle Arm64 platform compatibility.The dependency `python-neo-lzf` does not provide pre-built wheels for aarch64 architectures. This causes installation failures with tools like `uv` or `pip` in environments lacking a C compiler, or results in extremely slow builds under QEMU emulation. This commit modifies `pyproject.toml` to use PEP 508 environment markers: - Use `python-neo-lzf` on x86_64 (unchanged). - Switch to `python-lzf` on aarch64/arm64 platforms. This ensures smoother installation and compatibility on Arm-based devices (e.g., Raspberry Pi, AWS Graviton, Apple Silicon Docker containers). --- pyproject.toml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ad12bb0..7eaa1d0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,11 @@ authors = [{ name = "urasakikeisuke", email = "keisuke.urasaki@map4.jp" }] dependencies = [ "numpy>=1.21.0", "pydantic >=1.10.8, <3.0.0", - "python-neo-lzf>=0.3.0", + # python-neo-lzf lacks pre-built wheels for aarch64 (Arm64). + # To enable installation on Arm platforms without requiring compilation tools, + # we switch to python-lzf for aarch64/arm64 environments. + "python-neo-lzf>=0.3.0; platform_machine != 'aarch64' and platform_machine != 'arm64'", + "python-lzf; platform_machine == 'aarch64' or platform_machine == 'arm64'", ] readme = "README.md" requires-python = ">= 3.8.2"