Skip to content

Conversation

@urasakikeisuke
Copy link
Collaborator

@urasakikeisuke urasakikeisuke commented Dec 10, 2025

Updated dependencies to handle Arm64 platform compatibility.The dependency python-neo-lzf does not provide pre-built wheels for aarch64 architectures.

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.

Close #56

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).
@github-actions
Copy link

github-actions bot commented Dec 10, 2025

Coverage

Coverage Report
FileStmtsMissCoverMissing
src/pypcd4
   __init__.py20100% 
   _version.py18478%15–19
   pointcloud2.py591280%87–101
   pypcd4.py4244889%24–25, 136, 189, 352–353, 567, 583–605, 620–626, 636–646, 657–697, 707–708, 927–929, 949–950, 1071, 1076, 1079
TOTAL5036487% 

Tests Skipped Failures Errors Time
67 1 💤 0 ❌ 0 🔥 0.798s ⏱️

@github-actions
Copy link

Coverage

Coverage Report
FileStmtsMissCoverMissing
src/pypcd4
   __init__.py20100% 
   _version.py18478%15–19
   pointcloud2.py591280%87–101
   pypcd4.py4244889%24–25, 136, 189, 352–353, 567, 583–605, 620–626, 636–646, 657–697, 707–708, 927–929, 949–950, 1071, 1076, 1079
TOTAL5036487% 

Tests Skipped Failures Errors Time
67 1 💤 0 ❌ 0 🔥 0.857s ⏱️

@github-actions
Copy link

Coverage

Coverage Report
FileStmtsMissCoverMissing
src/pypcd4
   __init__.py20100% 
   _version.py18478%15–19
   pointcloud2.py591280%87–101
   pypcd4.py4244889%24–25, 136, 189, 352–353, 567, 583–605, 620–626, 636–646, 657–697, 707–708, 927–929, 949–950, 1071, 1076, 1079
TOTAL5036487% 

Tests Skipped Failures Errors Time
67 1 💤 0 ❌ 0 🔥 0.858s ⏱️

@urasakikeisuke urasakikeisuke self-assigned this Dec 10, 2025
@urasakikeisuke urasakikeisuke added rd/fix Bug fix for the user, not a fix to a build script rd/patch labels Dec 10, 2025
@urasakikeisuke urasakikeisuke marked this pull request as ready for review December 11, 2025 13:24
Copy link

@windsurf-bot windsurf-bot bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me 🤙

💡 To request another review, post a new comment with "/windsurf-review".

@urasakikeisuke urasakikeisuke merged commit b1949b2 into main Dec 12, 2025
12 checks passed
@urasakikeisuke urasakikeisuke deleted the build/switch-lzf-on-arm64 branch December 12, 2025 01:02
@johnthagen
Copy link

johnthagen commented Dec 12, 2025

@urasakikeisuke Are we sure this change was correct? The python-neo-lzf wheels on PyPI do have ARM64 support for macOS

The macOS wheels are universal, so they should work for ARM64 macOS.

As for Linux ARM64 wheels, yes those are missing. I opened an issue upstream to try to get that fixed there

So I think this PR should ideally be amended to only select python-lzf for Linux ARM64 hosts. And then hopefully can be reverted completely when python-neo-lzf adds the correct wheels.

@urasakikeisuke
Copy link
Collaborator Author

@johnthagen Thanks for pointing this out! You are absolutely right. Since I primarily verified this on a Linux container, I overlooked that the macOS wheels were already provided as Universal2.

I will immediately submit a follow-up PR to refine the environment markers. We will configure it to fall back to python-lzf only on Linux ARM64 environments, restoring python-neo-lzf for macOS ARM64.

Also, thank you for opening the issue upstream. Once that upstream issue is resolved and the Linux ARM64 wheels are published, we will revert these changes and standardize on python-neo-lzf across all platforms.

@urasakikeisuke
Copy link
Collaborator Author

@johnthagen I have released v1.4.2 on PyPI. Thanks again for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rd/fix Bug fix for the user, not a fix to a build script rd/patch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Starting from v1.4.0 pypcd4 cannot be installed on aarch64

4 participants