MCPcopy Create free account
hub / github.com/CodSpeedHQ/codspeed / uv_python_find

Function uv_python_find

src/executor/valgrind/helpers/python.rs:55–67  ·  view source on GitHub ↗
(request: &OsStr, cwd: &Path)

Source from the content-addressed store, hash-verified

53}
54
55fn 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`).

Callers 1

is_free_threaded_pythonFunction · 0.85

Calls 4

current_dirMethod · 0.80
argMethod · 0.80
argsMethod · 0.80
is_emptyMethod · 0.45

Tested by

no test coverage detected