(request: &OsStr, cwd: &Path)
| 53 | } |
| 54 | |
| 55 | fn uv_python_find(request: &OsStr, cwd: &Path) -> Option<PathBuf> { |
| 56 | let output = Command::new("uv") |
| 57 | .args(["python", "find"]) |
| 58 | .arg(request) |
| 59 | .current_dir(cwd) |
| 60 | .output() |
| 61 | .ok()?; |
| 62 | if !output.status.success() { |
| 63 | return None; |
| 64 | } |
| 65 | let path = String::from_utf8_lossy(&output.stdout).trim().to_owned(); |
| 66 | (!path.is_empty()).then(|| PathBuf::from(path)) |
| 67 | } |
| 68 | |
| 69 | /// Matches a full key variant (`cpython-3.13.0+freethreaded-linux-x86_64-gnu`) or a |
| 70 | /// version with the `t` suffix (`3.13t`, `cpython@3.13.1t`). |
no test coverage detected