override opencv-headless install#2093
Conversation
Greptile SummaryThis PR fixes a packaging conflict where
|
| Filename | Overview |
|---|---|
| nemo_retriever/pyproject.toml | Adds opencv-python ; sys_platform == 'never' override to suppress the conflicting transitive opencv-python package, and explicitly declares opencv-python-headless>=4.8.0 in the local extras so cv2 functionality is still available without the GUI variant stomping the headless install. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["pip/uv install .[local]"] --> B["Resolve dependencies"]
B --> C["nemotron wheels"]
C --> D["transitive: opencv-python"]
C --> E["transitive: opencv-python-headless"]
D -->|"override: sys_platform == 'never'"| F["Suppressed — never installed"]
E --> G["cv2/ directory"]
H["explicit: opencv-python-headless>=4.8.0"] --> G
G --> I["Clean cv2 install — no collision"]
Reviews (2): Last reviewed commit: "add uv.lock" | Re-trigger Greptile
Description
When you install .[local] from scratch, pip/uv end up resolving both opencv-python and opencv-python-headless. Neither one is declared by us, but both come in probably through the nemotron wheels. Those two packages both install to the same cv2/ directory on disk, so they stomp on each other.
Checklist