diff --git a/pyproject.toml b/pyproject.toml index b0dd7a2e..df084e16 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,13 @@ dependencies = [ "PyWinCtl >=0.0.42", # py.typed "keyboard @ git+https://github.com/boppreh/keyboard.git", # Fix install on macos and linux-ci https://github.com/boppreh/keyboard/pull/568 "numpy >=2.3.2", # Python 3.14 support # TODO: Bump when 3.15 wheels - "opencv-contrib-python-headless >=5.0", # v4.13: glibc 2.28 wheels (for aarch); v5 restored sdist + # v4.13: glibc 2.28 wheels (for aarch); v5 restored sdist + "opencv-contrib-python-headless >=5.0; sys_platform != 'win32' or platform_machine != 'ARM64'", + # Windows ARM64 has no opencv wheel (any version) so it source-builds the sdist. + # v5 sdist fails to build there (opencv-python setup.py expects an ffmpeg dll that + # isn't provided for win-arm64). Pin to the last 4.x that builds until win-arm64 + # wheels ship: https://github.com/opencv/opencv-python/pull/1143 + "opencv-contrib-python-headless ==4.11.*; sys_platform == 'win32' and platform_machine == 'ARM64'", "packaging >=20.0", # py.typed "tomli-w >=1.1.0", # Typing fixes diff --git a/uv.lock b/uv.lock index c8540eed..20766cc1 100644 --- a/uv.lock +++ b/uv.lock @@ -83,7 +83,8 @@ dependencies = [ { name = "keyboard" }, { name = "levenshtein" }, { name = "numpy" }, - { name = "opencv-contrib-python-headless" }, + { name = "opencv-contrib-python-headless", version = "4.11.0.86", source = { registry = "https://pypi.org/simple" }, marker = "platform_machine == 'ARM64' and sys_platform == 'win32'" }, + { name = "opencv-contrib-python-headless", version = "5.0.0.93", source = { registry = "https://pypi.org/simple" }, marker = "platform_machine != 'ARM64' or sys_platform != 'win32'" }, { name = "packaging" }, { name = "pillow", marker = "sys_platform != 'win32'" }, { name = "pyautogui" }, @@ -129,7 +130,8 @@ requires-dist = [ { name = "keyboard", git = "https://github.com/boppreh/keyboard.git" }, { name = "levenshtein", specifier = ">=0.27.3" }, { name = "numpy", specifier = ">=2.3.2" }, - { name = "opencv-contrib-python-headless", specifier = ">=5.0" }, + { name = "opencv-contrib-python-headless", marker = "platform_machine != 'ARM64' or sys_platform != 'win32'", specifier = ">=5.0" }, + { name = "opencv-contrib-python-headless", marker = "platform_machine == 'ARM64' and sys_platform == 'win32'", specifier = "==4.11.*" }, { name = "packaging", specifier = ">=20.0" }, { name = "pillow", marker = "sys_platform == 'linux'", specifier = ">=12.2.0" }, { name = "pyautogui", specifier = ">=0.9.52" }, @@ -353,10 +355,29 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/fd/6a/d3a169aaf8536cf228d56a09e04bcb713a2fe4410d4e2105b9419b5a9c89/numpy-2.5.0-cp314-cp314t-win_arm64.whl", hash = "sha256:016623417bb330d719d579daf2d6b9a01ddc52e41a9ed61a47f39fde46dcd865", size = 10686451, upload-time = "2026-06-21T20:57:49.313Z" }, ] +[[package]] +name = "opencv-contrib-python-headless" +version = "4.11.0.86" +source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version >= '3.15' and platform_machine == 'ARM64' and sys_platform == 'win32'", + "python_full_version < '3.15' and platform_machine == 'ARM64' and sys_platform == 'win32'", +] +dependencies = [ + { name = "numpy" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/53/cc/295e9a4e783ca71ba1b8fbd34e51bc603eba4611afcfc7de1b09b2d6ed8d/opencv-contrib-python-headless-4.11.0.86.tar.gz", hash = "sha256:839319098a73264c580c97cb1ca835f7fce3d30e4fa9fa6d4d0618fff551be0b", size = 150579288, upload-time = "2025-01-16T13:54:11.763Z" } + [[package]] name = "opencv-contrib-python-headless" version = "5.0.0.93" source = { registry = "https://pypi.org/simple" } +resolution-markers = [ + "python_full_version >= '3.15' and sys_platform == 'linux'", + "python_full_version < '3.15' and sys_platform == 'linux'", + "python_full_version >= '3.15' and platform_machine != 'ARM64' and sys_platform == 'win32'", + "python_full_version < '3.15' and platform_machine != 'ARM64' and sys_platform == 'win32'", +] dependencies = [ { name = "numpy" }, ]