diff --git a/pyproject.toml b/pyproject.toml index 225e4ed7..ddaf69f3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,24 +7,24 @@ requires-python = ">=3.11" dependencies = [ "uv", "gunicorn", - "aarecommon>=0.2.0", - "pydantic==2.11.4", - "numpy==2.2.5", + "aarecommon>=0.2.2", + "pydantic>=2.11", + "numpy", "jfjoch_client==1.0.0rc146", - "pyJWT==2.10.1", - "pyzmq==26.4.0", - "opencv-python-headless==4.11.0.86", + "pyJWT", + "pyzmq", + "opencv-python-headless", "PySide6==6.9.0", - "requests==2.32.4", - "pyepics==3.5.8", - "redis==6.2.0", - "python-redis-lock==4.0.0", - "fastapi==0.115.13", + "requests", + "pyepics~=3.5", + "redis", + "python-redis-lock", + "fastapi", "uvicorn", "aaredb>=0.2", - "python_multipart==0.0.20", - "websocket-client==1.8.0", - "sseclient==0.0.27", #Was sseclient-py==1.8.0 but this was broken??? + "python_multipart", + "websocket-client", + "sseclient", "psi-pshell==2.1.0", "bec_lib>=3.130.3", "bec-ipython-client>=3.130.3", @@ -53,6 +53,19 @@ docs = [ [lint] ignore = ["F401", "F541", "W503", "W504"] +[tool.uv] +# Transitive deps (aarecommon -> aarelc_infer) ask for the non-headless +# `opencv-python`. It unpacks into the same `cv2/` directory as the +# `opencv-python-headless` we depend on, so whichever installs last wins for the +# overlapping files and you get a mixed install -- the Python half of one wheel +# next to the native half of the other. That surfaces as +# `AttributeError: partially initialized module 'cv2' has no attribute +# 'gapi_wip_gst_GStreamerPipeline'` on `import cv2`, and it bites in the +# test-with-beamline-plugins job because installing the plugins re-resolves and +# flips the install order. A marker that never matches drops the requirement, +# leaving headless as the only cv2 provider. +override-dependencies = ["opencv-python; sys_platform == 'nonexistent'"] + [tool.uv.sources] aaredb = { index = "psi"}