Skip to content

fix(deps): skip pyrealsense2 on macOS#1556

Merged
paul-nechifor merged 2 commits intodevfrom
jeff/fix/deps_mac
Mar 14, 2026
Merged

fix(deps): skip pyrealsense2 on macOS#1556
paul-nechifor merged 2 commits intodevfrom
jeff/fix/deps_mac

Conversation

@jeff-hykin
Copy link
Member

@jeff-hykin jeff-hykin commented Mar 14, 2026

Problem

pyrealsense2 is not available on macOS, so uv sync / pip install fails

Solution

Added a sys_platform != 'darwin' so macos can install the rest of manipulation

Breaking Changes

None

How to Test

On macOS:

uv sync --all-extras --no-extra dds
# Should succeed without trying to install pyrealsense2

On Linux:

uv sync --all-extras --no-extra dds
# pyrealsense2 should still be installed
python -c "import pyrealsense2; print(pyrealsense2.__version__)"

Contributor License Agreement

  • I have read and approved the CLA.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Mar 14, 2026

Greptile Summary

Adds a sys_platform != 'darwin' environment marker to the pyrealsense2 dependency in pyproject.toml so that macOS installs skip this package (which has no macOS wheels). This follows the same platform-marker pattern already used for drake in the same [manipulation] extras group. All imports of pyrealsense2 in the codebase are already lazy (inside methods or behind TYPE_CHECKING), so macOS users won't hit import errors at runtime.

Confidence Score: 5/5

  • This PR is safe to merge — it's a single-line dependency marker change with no behavioral impact on Linux.
  • The change is minimal (one line), follows an existing pattern in the same file, and all runtime imports of pyrealsense2 are already guarded with lazy imports. No risk of breakage.
  • No files require special attention.

Important Files Changed

Filename Overview
pyproject.toml Adds sys_platform != 'darwin' environment marker to pyrealsense2 dependency, following the existing pattern used for drake. No issues found.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["uv sync / pip install"] --> B{"sys_platform?"}
    B -->|"darwin (macOS)"| C["Skip pyrealsense2"]
    B -->|"linux"| D["Install pyrealsense2"]
    D --> E["RealSenseCamera.start()"]
    E --> F["import pyrealsense2 as rs"]
    C --> G["RealSenseCamera not used on macOS"]
Loading

Last reviewed commit: 8054dc3

@paul-nechifor paul-nechifor merged commit eef0230 into dev Mar 14, 2026
21 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants