The real nix develop run surfaced a FileCollisionError: mediapipe declares a dependency on opencv-contrib-python (its own cv2 build), which collides with our own opencv-python-headless pin - both provide cv2/__init__.pyi with different contents. uv2nix merges every locked wheel into one environment and refuses on a content mismatch; a plain pip/uv venv install silently let whichever package installed last clobber the others files instead, which is why this never surfaced before. tracker/pyproject.toml now excludes opencv-contrib-python from resolution (tool.uv.exclude-dependencies) since opencv-python-headless already provides everything the tracker and mediapipe need - verified by installing the re-locked tracker/uv.lock into a real venv and confirming import mediapipe, import cv2, and from mediapipe.tasks import python all succeed with only the headless build present. Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>
36 lines
1.3 KiB
TOML
36 lines
1.3 KiB
TOML
[project]
|
|
name = "virtual-kinect-tracker"
|
|
version = "0.0.1"
|
|
description = "Webcam -> MediaPipe pose/segmentation tracker publishing Kinect-style frames over the IPC contract."
|
|
readme = "README.md"
|
|
requires-python = "==3.12.*"
|
|
# Pinned to the known-good combination verified in docs/setup-linux.md, and
|
|
# locked (tracker/uv.lock) so the Nix flake (flake.nix) can build this exact
|
|
# environment reproducibly without a venv at use time.
|
|
dependencies = [
|
|
"opencv-python-headless==5.1.0.95",
|
|
"mediapipe==1.2.3",
|
|
"numpy==2.5.5",
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
dev = ["pytest>=8"]
|
|
|
|
# mediapipe declares a dependency on opencv-contrib-python (its own cv2 build),
|
|
# which collides with our opencv-python-headless pin above (both provide
|
|
# cv2/__init__.pyi with different contents - a hard error under uv2nix's
|
|
# stricter environment merge, and a silent install-order footgun under plain
|
|
# pip/uv). We only need core cv2 (image resize/color-convert), which
|
|
# opencv-python-headless already provides, so drop the contrib build from the
|
|
# resolution entirely rather than installing two cv2 providers.
|
|
[tool.uv]
|
|
exclude-dependencies = ["opencv-contrib-python"]
|
|
|
|
[build-system]
|
|
requires = ["setuptools>=68"]
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
[tool.setuptools]
|
|
packages = ["tracker"]
|
|
package-dir = { tracker = "." }
|