{"record":{"id":"8c71cf7dd707a26d","repo":"roboflow/supervision","slug":"opencv-runtime-requirement-remains-in-wheel-re","errorCode":null,"errorMessage":"OpenCV runtime requirement remains in {wheel}: {requirements}","messagePattern":"OpenCV runtime requirement remains in (.+?): (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":".github/scripts/verify_clean_wheel.py","lineNumber":42,"sourceCode":"    \"\"\"Read the core metadata embedded in a wheel archive.\"\"\"\n    with zipfile.ZipFile(wheel) as archive:\n        metadata_paths = [\n            name for name in archive.namelist() if name.endswith(\"/METADATA\")\n        ]\n        if len(metadata_paths) != 1:\n            raise ValueError(\n                f\"expected one METADATA file in {wheel}, found {metadata_paths}\"\n            )\n        return message_from_bytes(archive.read(metadata_paths[0]))\n\n\ndef _validate_metadata(wheel: Path) -> None:\n    \"\"\"Reject wheels that retain an OpenCV runtime requirement or extra.\"\"\"\n    metadata = _wheel_metadata(wheel)\n    requirements = metadata.get_all(\"Requires-Dist\", [])\n    extras = metadata.get_all(\"Provides-Extra\", [])\n    if any(\"opencv\" in requirement.lower() for requirement in requirements):\n        raise ValueError(\n            f\"OpenCV runtime requirement remains in {wheel}: {requirements}\"\n        )\n    if any(\"opencv\" in extra.lower() for extra in extras):\n        raise ValueError(f\"OpenCV extra remains in {wheel}: {extras}\")\n\n\ndef _validate_manifest(manifest: Path) -> None:\n    \"\"\"Keep the installed-wheel fallback smoke contract explicit and complete.\"\"\"\n    checks = {\n        s\n        for line in manifest.read_text(encoding=\"utf-8\").splitlines()\n        if (s := line.strip()) and not s.startswith(\"#\")\n    }\n    if checks != _MANIFEST_CHECKS:\n        raise ValueError(\n            f\"unexpected fallback manifest {checks}; expected {_MANIFEST_CHECKS}\"\n        )\n","sourceCodeStart":24,"sourceCodeEnd":60,"githubUrl":"https://github.com/roboflow/supervision/blob/7f254d9784d4c37e0f03cd89ddee164c8db099c0/.github/scripts/verify_clean_wheel.py#L24-L60","documentation":"Error \"OpenCV runtime requirement remains in {wheel}: {requirements}\" thrown in roboflow/supervision.","triggerScenarios":"Thrown at .github/scripts/verify_clean_wheel.py:42 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove the OpenCV runtime dependency from the wheel's requirements before publishing; the fallback build must not depend on opencv.","Check pyproject.toml / build config so the opencv dependency is excluded from the clean wheel target."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7f254d9784d4c37e0f03cd89ddee164c8db099c0","analyzedAt":"2026-08-15T05:13:01.950Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}