Skip to content

Commit d8786f2

Browse files
build: limit python-lzf fallback to Linux aarch64 only (#58)
In v1.4.1, the dependency was switched to `python-lzf` for all ARM64 platforms to resolve installation issues. However, `python-neo-lzf` already provides Universal2 wheels for macOS (supporting Apple Silicon), so the fallback is strictly necessary only for Linux aarch64 environments where pre-built wheels are missing. This commit refines the PEP 508 environment markers to: - Use `python-lzf` ONLY on Linux aarch64/arm64. - Restore `python-neo-lzf` for macOS ARM64 (and continue using it for x86_64).
1 parent b1949b2 commit d8786f2

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

pyproject.toml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,16 @@ authors = [{ name = "urasakikeisuke", email = "keisuke.urasaki@map4.jp" }]
66
dependencies = [
77
"numpy>=1.21.0",
88
"pydantic >=1.10.8, <3.0.0",
9-
# python-neo-lzf lacks pre-built wheels for aarch64 (Arm64).
10-
# To enable installation on Arm platforms without requiring compilation tools,
11-
# we switch to python-lzf for aarch64/arm64 environments.
12-
"python-neo-lzf>=0.3.0; platform_machine != 'aarch64' and platform_machine != 'arm64'",
13-
"python-lzf; platform_machine == 'aarch64' or platform_machine == 'arm64'",
9+
10+
# NOTE: `python-neo-lzf` currently lacks pre-built wheels for Linux aarch64.
11+
# To avoid compilation errors on Linux ARM environments, we use `python-lzf` as a fallback.
12+
# macOS ARM64 (Apple Silicon) is supported by `python-neo-lzf` (Universal2), so it is not affected.
13+
14+
# 1. Fallback: Use `python-lzf` ONLY on Linux ARM64.
15+
"python-lzf; sys_platform == 'linux' and (platform_machine == 'aarch64' or platform_machine == 'arm64')",
16+
17+
# 2. Standard: Use `python-neo-lzf` on all other platforms (macOS, Windows, x86_64 Linux, etc.).
18+
"python-neo-lzf>=0.3.0; sys_platform != 'linux' or (platform_machine != 'aarch64' and platform_machine != 'arm64')",
1419
]
1520
readme = "README.md"
1621
requires-python = ">= 3.8.2"

0 commit comments

Comments
 (0)