mirror of https://github.com/astral-sh/uv
Skip non-existent directories in bytecode compilation (#15608)
## Summary Closes https://github.com/astral-sh/uv/issues/15577.
This commit is contained in:
parent
c2c713e5d2
commit
01e5195ef3
|
|
@ -1,12 +1,14 @@
|
|||
use anstream::AutoStream;
|
||||
use anyhow::Context;
|
||||
use owo_colors::OwoColorize;
|
||||
use std::borrow::Cow;
|
||||
use std::io::stdout;
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::time::Duration;
|
||||
use std::{fmt::Display, fmt::Write, process::ExitCode};
|
||||
|
||||
use anstream::AutoStream;
|
||||
use anyhow::Context;
|
||||
use owo_colors::OwoColorize;
|
||||
use tracing::debug;
|
||||
|
||||
pub(crate) use build_frontend::build_frontend;
|
||||
pub(crate) use cache_clean::cache_clean;
|
||||
pub(crate) use cache_dir::cache_dir;
|
||||
|
|
@ -159,6 +161,13 @@ pub(super) async fn compile_bytecode(
|
|||
let mut files = 0;
|
||||
for site_packages in venv.site_packages() {
|
||||
let site_packages = CWD.join(site_packages);
|
||||
if !site_packages.exists() {
|
||||
debug!(
|
||||
"Skipping non-existent site-packages directory: {}",
|
||||
site_packages.display()
|
||||
);
|
||||
continue;
|
||||
}
|
||||
files += compile_tree(
|
||||
&site_packages,
|
||||
venv.python_executable(),
|
||||
|
|
|
|||
Loading…
Reference in New Issue