`uv add magika` does not work on `macos-12`
uv add magika does not work on macos-12 (pip install magika does work well).
This is not related to the latest 0.6.1 version, it was also happening for 0.5.1.
$ uv init
$ uv add magika
warning: `VIRTUAL_ENV=/private/tmp/magika-test/venv` does not match the project environment path `.venv` and will be ignored; use `--active` to target the active environment instead
Using CPython 3.12.5
Creating virtual environment at: .venv
Resolved 15 packages in 472ms
error: Distribution `onnxruntime==1.21.0 @ registry+https://pypi.org/simple` can't be installed because it doesn't have a source distribution or wheel for the current platform
hint: You're on macOS (`macosx_12_0_arm64`), but `onnxruntime` (v1.21.0) only has wheels for the following platforms: `manylinux_2_27_aarch64`, `manylinux_2_27_x86_64`, `manylinux_2_28_aarch64`, `manylinux_2_28_x86_64`, `macosx_13_0_universal2`, `win_amd64`
The problem is not with magika, but with onnxruntime. As in: uv add onnxruntime fails as well (with a similar error).
One workaround is to tell uv which onnxruntime version to use (e.g., uv add onnxruntime==1.19.1); then uv add magika works.
Not sure what's the best way to solve this. It seems the problem is only on old mac version such as macos-12 (we do test uv add magika for macos-14, and everything works well). Ideally, we would constraint the onnxruntime version only for macos-12 or so. Not sure it's possible though.
@reyammer MacOS 12 is EOL https://endoflife.date/macos
yep indeed. But, what I'm annoyed about is that we could actually support it easily, the only problem being the underlying onnxruntime dependency resolution. If there is any way to specify as version constraints "if macos-12, then use version xyz of onnxruntime", we would be done!
@reyammer There's no point in supporting an EOL os version. If you look here https://github.com/actions/runner-images?tab=readme-ov-file#available-images there's no longer an image for macos12 in the runners.
yep indeed. But, what I'm annoyed about is that we could actually support it easily, the only problem being the underlying onnxruntime dependency resolution. If there is any way to specify as version constraints "if macos-12, then use version xyz of onnxruntime", we would be done!
Similar troubles on Windows, FWIW: https://github.com/microsoft/markitdown/issues/1266
Similar troubles on Windows, FWIW: https://github.com/microsoft/markitdown/issues/1266
@afourney Thanks for reporting! Tracked in #1092 and fixed in #1099 (in a similar way to what markdown did)