Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ChannyClaus committed Mar 27, 2024
1 parent 2275dd2 commit 5d79d5e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
7 changes: 0 additions & 7 deletions crates/uv-installer/src/site_packages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,6 @@ impl<'a> SitePackages<'a> {
};

let idx = distributions.len();

if by_name.get(dist_info.name()).is_some() {
continue;
}
// Index the distribution by name.
by_name
.entry(dist_info.name().clone())
Expand All @@ -79,9 +75,6 @@ impl<'a> SitePackages<'a> {

// Index the distribution by URL.
if let InstalledDist::Url(dist) = &dist_info {
if by_url.get(&dist.url).is_some() {
continue;
}
by_url
.entry(dist.url.clone())
.or_insert_with(Vec::new)
Expand Down
1 change: 1 addition & 0 deletions crates/uv-interpreter/src/interpreter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -588,6 +588,7 @@ mod tests {
"base_prefix": "/home/ferris/.pyenv/versions/3.12.0",
"prefix": "/home/ferris/projects/uv/.venv",
"sys_executable": "/home/ferris/projects/uv/.venv/bin/python",
"sys_path": [],
"stdlib": "/home/ferris/.pyenv/versions/3.12.0/lib/python3.12",
"scheme": {
"data": "/home/ferris/.pyenv/versions/3.12.0",
Expand Down
8 changes: 7 additions & 1 deletion crates/uv-interpreter/src/python_environment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,13 @@ impl PythonEnvironment {
let mut site_packages = Vec::new();
site_packages.push(self.interpreter.purelib());
site_packages.push(self.interpreter.platlib());
site_packages.extend(self.interpreter.sys_path());
site_packages.extend(
self.interpreter
.sys_path()
.iter()
.filter(|path| path.ends_with("site-packages") || path.ends_with("dist-packages")),
);
site_packages.sort();
site_packages.dedup();
site_packages.into_iter()
}
Expand Down

0 comments on commit 5d79d5e

Please sign in to comment.