mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
Recreate pyenv if it was created with uv
Temporary fix for #4074 breaking normal builds
This commit is contained in:
parent
22f4a83222
commit
e728e8bcb1
1 changed files with 7 additions and 0 deletions
|
@ -27,6 +27,13 @@ pub fn setup_pyenv(args: PyenvArgs) {
|
|||
let pyenv_python = pyenv_bin_folder.join("python");
|
||||
let pip_sync = pyenv_bin_folder.join("pip-sync");
|
||||
|
||||
// Ensure the venv gets recreated properly if it was created by our uv branch
|
||||
let cache_tag = pyenv_folder.join("CACHEDIR.TAG");
|
||||
if cache_tag.exists() {
|
||||
println!("Cleaning up uv pyenv...");
|
||||
std::fs::remove_dir_all(pyenv_folder).expect("Failed to remove pyenv folder");
|
||||
}
|
||||
|
||||
if !pyenv_python.exists() {
|
||||
run_command(
|
||||
Command::new(&args.python_bin)
|
||||
|
|
Loading…
Reference in a new issue