`uv add magika` does not work on `macos-12`
- Dominant language
- Rust
- Stars
- 18.6k
- Forks
- 1.2k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 20
Description
`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.
```shell
$ 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.
Contributor guide
Research direction
Start by reproducing `uv add magika` and `uv add onnxruntime` on macOS 12, then compare the dependency resolution with macOS 14 and the working `onnxruntime==1.19.1` workaround. Determine the project dependency metadata that controls the selected version; done means installation succeeds on macOS 12 without regressing supported newer macOS versions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos, python
- Domain
- build-system, machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100